From e961b0ea8d3cf6226b37c77c998c6e1188e9dee8 Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 18 Nov 2005 19:55:55 +0000 Subject: [PATCH] tweaks for real spine label printer git-svn-id: svn://svn.open-ils.org/ILS/trunk@2081 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/evergreen/cat/spine_label_wizard.xul | 4 ++-- .../staff_client/chrome/content/evergreen/util/print.js | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Evergreen/staff_client/chrome/content/evergreen/cat/spine_label_wizard.xul b/Evergreen/staff_client/chrome/content/evergreen/cat/spine_label_wizard.xul index 19486ae580..773fe99466 100644 --- a/Evergreen/staff_client/chrome/content/evergreen/cat/spine_label_wizard.xul +++ b/Evergreen/staff_client/chrome/content/evergreen/cat/spine_label_wizard.xul @@ -42,7 +42,7 @@ count_tb.setAttribute('name','count_' + i); btn.addEventListener('command', function() { - sPrint(label2html(label_tb.value), false); + sPrint(label2html(label_tb.value), false, { 'marginLeft' : document.getElementById('margin') } ); }, false ); } @@ -83,7 +83,7 @@ - For this Pre-Beta release, we're focusing on the dot-matrix printers used by PINES. In the future, we will support all manner of label sheets with various printers. We'll also have optional template variables for things like shelving location, copy number, and barcode. For now, please check the character dimensions for a spine label and the number of lines between labels: + For this Pre-Beta release, we're focusing on the dot-matrix printers used by PINES (OKI MICROLINE 320 Turbo 9 Pin Printer). In the future, we will support all manner of label sheets with various printers. We'll also have optional template variables for things like shelving location, copy number, and barcode. For now, please check the character dimensions for a spine label, the number of lines between labels, and the left-margin for the printer: diff --git a/Evergreen/staff_client/chrome/content/evergreen/util/print.js b/Evergreen/staff_client/chrome/content/evergreen/util/print.js index 4a9789e905..908b1ac93d 100644 --- a/Evergreen/staff_client/chrome/content/evergreen/util/print.js +++ b/Evergreen/staff_client/chrome/content/evergreen/util/print.js @@ -195,7 +195,7 @@ function last_sPrint() { if (mw.G.last_receipt) sPrint( mw.G.last_receipt, false ); } -function sPrint(s,silent) { +function sPrint(s,silent,params) { sdump('D_PRINT',arg_dump(arguments)); mw.G.last_receipt = s; var w = new_window('data:text/html,' + s + '\r\n', { 'window_name':'LastPrint' }); @@ -203,7 +203,7 @@ function sPrint(s,silent) { setTimeout( function() { if (!mw.printDebug) { - NSPrint(w,silent); w.minimize(); w.close(); mw.minimize(); + NSPrint(w,silent,params); w.minimize(); w.close(); mw.minimize(); } else { sdump('D_PRINT','Not printing due to printDebug flag.'); } @@ -211,7 +211,7 @@ function sPrint(s,silent) { ); } -function NSPrint(w,silent) +function NSPrint(w,silent,params) { sdump('D_PRINT',arg_dump(arguments)); if (!w) { w = this; } @@ -230,6 +230,7 @@ function NSPrint(w,silent) gPrintSettings.marginBottom = 0; gPrintSettings.marginRight = 0; */ + if (params.marginLeft) gPrintSettings.marginLeft = params.marginLeft; gPrintSettings.headerStrLeft = ''; gPrintSettings.headerStrCenter = ''; gPrintSettings.headerStrRight = ''; -- 2.43.2