From 0b88290bf6faf1dd5d859cc700538d333794bb24 Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 1 May 2006 13:34:47 +0000 Subject: [PATCH] in support of spine labels git-svn-id: svn://svn.open-ils.org/ILS/trunk@3999 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/main/constants.js | 1 + .../chrome/content/util/browser.js | 8 +- .../chrome/content/util/rbrowser.xul | 8 + .../staff_client/server/cat/copy_editor.js | 11 +- .../staff_client/server/cat/spine_labels.xul | 203 ++++++++++++++++++ .../server/cat/volume_copy_creator.xul | 15 +- .../staff_client/server/circ/copy_status.js | 18 ++ .../staff_client/server/circ/copy_status.xul | 1 + .../server/circ/copy_status_overlay.xul | 2 + 9 files changed, 262 insertions(+), 5 deletions(-) create mode 100644 Open-ILS/xul/staff_client/server/cat/spine_labels.xul diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index 82a385453d..7e2c59c135 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -178,6 +178,7 @@ var urls = { 'XUL_PRINT_LIST_TEMPLATE_EDITOR' : '/xul/server/circ/print_list_template_editor.xul', 'XUL_RECORD_BUCKETS' : '/xul/server/cat/record_buckets.xul', 'XUL_REMOTE_BROWSER' : '/xul/server/util/rbrowser.xul', + 'XUL_SPINE_LABEL' : '/xul/server/cat/spine_labels.xul', 'XUL_STANDALONE' : 'chrome://open_ils_staff_client/content/circ/offline.xul', 'XUL_STAT_CAT_EDIT' : '/xul/server/admin/stat_cat_editor.xhtml', 'XUL_SURVEY_WIZARD' : 'chrome://open_ils_staff_client/content/admin/survey_wizard.xul', diff --git a/Open-ILS/xul/staff_client/chrome/content/util/browser.js b/Open-ILS/xul/staff_client/chrome/content/util/browser.js index 7d67c7fbb6..082841002e 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/browser.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.js @@ -21,6 +21,7 @@ util.browser.prototype = { obj.url = params['url']; obj.push_xulG = params['push_xulG']; + obj.alt_print = params['alt_print']; JSAN.use('util.controller'); obj.controller = new util.controller(); obj.controller.init( @@ -34,7 +35,12 @@ util.browser.prototype = { ['command'], function() { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - obj.get_content().print(); + if (obj.alt_print) { + JSAN.use('util.print'); var p = new util.print(); + p.NSPrint(obj.get_content(),false,{}); + } else { + obj.get_content().print(); + } } ], 'cmd_forward' : [ diff --git a/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul b/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul index 42b8b2156d..e0282b43dc 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul +++ b/Open-ILS/xul/staff_client/chrome/content/util/rbrowser.xul @@ -55,10 +55,14 @@ var push_xulG = true; if (g.cgi.param('no_xulG') || xulG.no_xulG) push_xulG = false; + var alt_print = false; + if (g.cgi.param('alternate_print') || xulG.alternate_print) alt_print = true; + g.browser.init( { 'url' : url, 'push_xulG' : push_xulG, + 'alt_print' : alt_print, } ); @@ -73,6 +77,10 @@ document.getElementById('browser_print').hidden = false; } + if (g.cgi.param('title')) { + try { document.title = g.cgi.param('title'); } catch(E) {} + try { window.title = g.cgi.param('title'); } catch(E) {} + } } catch(E) { var err_msg = "!! This software has encountered an error. Please tell your friendly " + diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index e5c2838ce4..13febb4706 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -750,19 +750,24 @@ g.render_input = function(node,input_cmd) { g.stash_and_close = function() { if (g.handle_update) { try { + alert('c-pause'); var r = g.network.request( api.FM_ACP_FLESHED_BATCH_UPDATE.app, api.FM_ACP_FLESHED_BATCH_UPDATE.method, [ ses(), g.copies ] ); + if (typeof r.ilsevent != 'undefined') { + g.error.standard_unexpected_error_alert('copy update',r); + } /* FIXME -- revisit the return value here */ + alert('c-pause'); } catch(E) { alert('copy update error: ' + js2JSON(E)); } } - g.data.temp = js2JSON( g.copies ); - g.error.sdump('D_CAT','in modal window, g.data.temp = \n' + g.data.temp + '\n'); - g.data.stash('temp'); + g.data.temp_copies = js2JSON( g.copies ); + g.data.stash('temp_copies'); + g.error.sdump('D_CAT','in modal window, g.data.temp_copies = \n' + g.data.temp_copies + '\n'); window.close(); } diff --git a/Open-ILS/xul/staff_client/server/cat/spine_labels.xul b/Open-ILS/xul/staff_client/server/cat/spine_labels.xul new file mode 100644 index 0000000000..9446a87d01 --- /dev/null +++ b/Open-ILS/xul/staff_client/server/cat/spine_labels.xul @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Currently, this interface is designed for and tested with an OKI MICROLINE 320 Turbo 9 Pin Printer using SP1 stock (thank you Uncle Remus!). More to come as time, money, and printer/ink/label donations permit. ;) Please join the PINES-DEV or OPEN-ILS-DEV mailing lists (at http://open-ils.org/) for discussion on spine labels. + + PINES: In Windows, we're assuming a generic/text printer device. The instructions for creating one should be available on the helpdesk. + + + +