[open-ils-commits] r12857 - in trunk/Open-ILS/xul/staff_client/server: cat skin (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 13 22:44:41 EDT 2009
Author: phasefx
Date: 2009-04-13 22:44:39 -0400 (Mon, 13 Apr 2009)
New Revision: 12857
Added:
trunk/Open-ILS/xul/staff_client/server/skin/print.css
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js
Log:
porting the "top-margin label fix" from 1.2
Modified: trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2009-04-14 02:14:56 UTC (rev 12856)
+++ trunk/Open-ILS/xul/staff_client/server/cat/spine_labels.js 2009-04-14 02:44:39 UTC (rev 12857)
@@ -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++) {
Added: trunk/Open-ILS/xul/staff_client/server/skin/print.css
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/skin/print.css (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/skin/print.css 2009-04-14 02:44:39 UTC (rev 12857)
@@ -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