From 952760b7296b3ff4296ee9b9cd6c6fce4f291120 Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 14 Apr 2009 02:44:39 +0000 Subject: [PATCH] porting the "top-margin label fix" from 1.2 git-svn-id: svn://svn.open-ils.org/ILS/trunk@12857 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/spine_labels.js | 12 +++++++++--- Open-ILS/xul/staff_client/server/skin/print.css | 8 ++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 Open-ILS/xul/staff_client/server/skin/print.css diff --git a/Open-ILS/xul/staff_client/server/cat/spine_labels.js b/Open-ILS/xul/staff_client/server/cat/spine_labels.js index 880d00d66..3cd5c6b56 100644 --- a/Open-ILS/xul/staff_client/server/cat/spine_labels.js +++ b/Open-ILS/xul/staff_client/server/cat/spine_labels.js @@ -230,8 +230,10 @@ var mm = Number($('mm').value); if (mm == NaN) mm = 2; /* middle margin */ var lw = Number($('lw').value) || 8; var ll = Number($('ll').value) || 9; /* spine label width and length */ var plw = Number($('plw').value) || 28; var pll = Number($('pll').value) || 9; /* pocket label width and length */ - var html = "Spine Labels\n"; + var html = ""; + html += "" + html += ""; + html += "Spine Labels\n"; var nl = document.getElementsByAttribute('name','template'); for (var i = 0; i < nl.length; i++) { if (typeof idx == 'undefined' || idx == null) { } else { @@ -241,7 +243,11 @@ for (var j = 0; j < volume.copies().length; j++) { var copy = volume.copies()[j]; - html += '
\n';
+                            if (i == 0) {
+    							html += '
\n';
+                            } else {
+    							html += '
\n';
+                            }
 							var gb = nl[i].getElementsByTagName('groupbox')[0];
 							var nl2 = gb.getElementsByAttribute('name','spine');
 							for (var k = 0; k < nl2.length; k++) {
diff --git a/Open-ILS/xul/staff_client/server/skin/print.css b/Open-ILS/xul/staff_client/server/skin/print.css
new file mode 100644
index 000000000..af654bb78
--- /dev/null
+++ b/Open-ILS/xul/staff_client/server/skin/print.css
@@ -0,0 +1,8 @@
+.first_pre {
+    page-break-after: always;
+    margin-top: -0.20cm;
+}
+
+.not_first_pre {
+    page-break-after: always;
+}
-- 
2.11.0