tweaks for real spine label printer
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Nov 2005 19:55:55 +0000 (19:55 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Nov 2005 19:55:55 +0000 (19:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2081 dcc99617-32d9-48b4-a31d-7c20da2025e4

Evergreen/staff_client/chrome/content/evergreen/cat/spine_label_wizard.xul
Evergreen/staff_client/chrome/content/evergreen/util/print.js

index 19486ae..773fe99 100644 (file)
@@ -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 @@
                <grid>
                        <columns> <column flex="0" /> <column flex="1" /> <column flex="0" /> </columns>
                        <rows id="page1_rows">
-                               <row><spacer/><description>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:</description><grid><columns><column/><column/></columns><rows><row><label value="Columns"/><textbox id="cols" value="30"/></row><row><label value="Rows"/><textbox id="rows" value="3"/></row><row><label value="Lines Between"/><textbox id="between" value="2"/></row></rows></grid></row>
+                               <row><spacer/><description>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:</description><grid><columns><column/><column/></columns><rows><row><label value="Left Margin"/><textbox id="margin" value=".63"/><row><label value="Columns"/><textbox id="cols" value="9"/></row><row><label value="Rows"/><textbox id="rows" value="9"/></row><row><label value="Lines Between"/><textbox id="between" value="2"/></row></rows></grid></row>
                                <row><spacer/></row>
                                <row><spacer/><label value="Label" /><label value="Print This Many"/></row>
                        </rows>
index 4a9789e..908b1ac 100644 (file)
@@ -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,<html>' + s + '</html>\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 = '';