[open-ils-commits] r9965 - in
branches/rel_1_2_2/Open-ILS/xul/staff_client/server: cat skin
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 3 10:52:07 EDT 2008
Author: phasefx
Date: 2008-07-03 10:52:00 -0400 (Thu, 03 Jul 2008)
New Revision: 9965
Added:
branches/rel_1_2_2/Open-ILS/xul/staff_client/server/skin/print.css
Modified:
branches/rel_1_2_2/Open-ILS/xul/staff_client/server/cat/spine_labels.js
Log:
brute force readjustment of first spine/pocket label in a given print session to eliminate .2cm of extra top margin
Modified: branches/rel_1_2_2/Open-ILS/xul/staff_client/server/cat/spine_labels.js
===================================================================
--- branches/rel_1_2_2/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2008-07-03 04:25:39 UTC (rev 9964)
+++ branches/rel_1_2_2/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2008-07-03 14:52:00 UTC (rev 9965)
@@ -229,8 +229,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 = "<html><head><link type='text/css' rel='stylesheet' href='data:text/css,pre{font-size:" + pt;
- html += "pt; page-break-after: always;}'></link><title>Spine Labels</title></head><body>\n";
+ var html = "<html><head>";
+ html += "<link type='text/css' rel='stylesheet' href='/xul/server/skin/print.css'></link>"
+ html += "<link type='text/css' rel='stylesheet' href='data:text/css,pre{font-size:" + pt + "pt;}'></link>";
+ html += "<title>Spine Labels</title></head><body>\n";
var nl = document.getElementsByAttribute('name','template');
for (var i = 0; i < nl.length; i++) {
if (typeof idx == 'undefined' || idx == null) { } else {
@@ -240,7 +242,11 @@
for (var j = 0; j < volume.copies().length; j++) {
var copy = volume.copies()[j];
- html += '<pre>\n';
+ if (i == 0) {
+ html += '<pre class="first_pre">\n';
+ } else {
+ html += '<pre class="not_first_pre">\n';
+ }
var gb = nl[i].getElementsByTagName('groupbox')[0];
var nl2 = gb.getElementsByAttribute('name','spine');
for (var k = 0; k < nl2.length; k++) {
Added: branches/rel_1_2_2/Open-ILS/xul/staff_client/server/skin/print.css
===================================================================
--- branches/rel_1_2_2/Open-ILS/xul/staff_client/server/skin/print.css (rev 0)
+++ branches/rel_1_2_2/Open-ILS/xul/staff_client/server/skin/print.css 2008-07-03 14:52:00 UTC (rev 9965)
@@ -0,0 +1,8 @@
+.first_pre {
+ page-break-after: always;
+ margin-top: -0.20cm;
+}
+
+.not_first_pre {
+ page-break-after: always;
+}
More information about the open-ils-commits
mailing list