[open-ils-commits] r13378 - in branches/rel_1_4_0/Open-ILS/xul/staff_client/server: cat skin (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 12 10:02:11 EDT 2009
Author: phasefx
Date: 2009-06-12 10:02:10 -0400 (Fri, 12 Jun 2009)
New Revision: 13378
Added:
branches/rel_1_4_0/Open-ILS/xul/staff_client/server/skin/print.css
Modified:
branches/rel_1_4_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js
Log:
porting the "top-margin label fix" from 1.2
Modified: branches/rel_1_4_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js
===================================================================
--- branches/rel_1_4_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2009-06-12 12:37:54 UTC (rev 13377)
+++ branches/rel_1_4_0/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2009-06-12 14:02:10 UTC (rev 13378)
@@ -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 = "<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 {
@@ -241,7 +243,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++) {
Copied: branches/rel_1_4_0/Open-ILS/xul/staff_client/server/skin/print.css (from rev 12858, branches/rel_1_4/Open-ILS/xul/staff_client/server/skin/print.css)
===================================================================
--- branches/rel_1_4_0/Open-ILS/xul/staff_client/server/skin/print.css (rev 0)
+++ branches/rel_1_4_0/Open-ILS/xul/staff_client/server/skin/print.css 2009-06-12 14:02:10 UTC (rev 13378)
@@ -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