From b9c79ed5e2ed29b0169659cb360c2785e05a5865 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 13 Feb 2008 04:00:28 +0000 Subject: [PATCH] removing dead code.. Hold Capture interface is a variant of Check In interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@8740 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/server/circ/hold_capture.js | 182 ------------------ .../staff_client/server/circ/hold_capture.xul | 78 -------- .../server/circ/hold_capture_overlay.xul | 56 ------ 3 files changed, 316 deletions(-) delete mode 100644 Open-ILS/xul/staff_client/server/circ/hold_capture.js delete mode 100644 Open-ILS/xul/staff_client/server/circ/hold_capture.xul delete mode 100644 Open-ILS/xul/staff_client/server/circ/hold_capture_overlay.xul diff --git a/Open-ILS/xul/staff_client/server/circ/hold_capture.js b/Open-ILS/xul/staff_client/server/circ/hold_capture.js deleted file mode 100644 index 3c65993714..0000000000 --- a/Open-ILS/xul/staff_client/server/circ/hold_capture.js +++ /dev/null @@ -1,182 +0,0 @@ -dump('entering circ.hold_capture.js\n'); -// vim:noet:sw=4:ts=4: - -if (typeof circ == 'undefined') circ = {}; -circ.hold_capture = function (params) { - - JSAN.use('util.error'); this.error = new util.error(); - JSAN.use('util.network'); this.network = new util.network(); - this.OpenILS = {}; JSAN.use('OpenILS.data'); this.OpenILS.data = new OpenILS.data(); this.OpenILS.data.init({'via':'stash'}); -} - -circ.hold_capture.prototype = { - - 'init' : function( params ) { - - var obj = this; - - JSAN.use('circ.util'); - var columns = circ.util.columns( - { - 'barcode' : { 'hidden' : false }, - 'title' : { 'hidden' : false }, - 'status' : { 'hidden' : false }, - //'checkin_status' : { 'hidden' : false }, - 'checkin_route_to' : { 'hidden' : false }, - 'checkin_text' : { 'hidden' : false, 'flex' : 3 }, - } - ); - dump('columns = ' + js2JSON(columns) + '\n'); - - JSAN.use('util.list'); obj.list = new util.list('hold_capture_list'); - obj.list.init( - { - 'columns' : columns, - 'map_row_to_columns' : circ.util.std_map_row_to_columns(), - } - ); - - JSAN.use('util.controller'); obj.controller = new util.controller(); - obj.controller.init( - { - 'control_map' : { - 'hold_capture_barcode_entry_textbox' : [ - ['keypress'], - function(ev) { - if (ev.keyCode && ev.keyCode == 13) { - obj.hold_capture(); - } - } - ], - 'cmd_broken' : [ - ['command'], - function() { alert(document.getElementById('circStrings').getString('staff.circ.unimplemented')); } - ], - 'cmd_hold_capture_submit_barcode' : [ - ['command'], - function() { - obj.hold_capture(); - } - ], - 'cmd_hold_capture_print' : [ - ['command'], - function() { - var p = { - 'template' : 'hold_capture' - }; - obj.list.print(p); - } - ], - 'cmd_hold_capture_reprint' : [ - ['command'], - function() { - } - ], - 'cmd_hold_capture_done' : [ - ['command'], - function() { - } - ], - } - } - ); - this.controller.view.hold_capture_barcode_entry_textbox.focus(); - - }, - - 'hold_capture' : function() { - var obj = this; - try { - var barcode = obj.controller.view.hold_capture_barcode_entry_textbox.value; - JSAN.use('circ.util'); - var hold_capture = circ.util.hold_capture_via_copy_barcode( - ses(), barcode, true - ); - if (hold_capture) { - JSAN.use('patron.util'); - var au_obj; - if (hold_capture.hold && hold_capture.hold.usr()) { - - au_obj = patron.util.retrieve_au_via_id( ses(), hold_capture.hold.usr() ); - - } else { - - au_obj = new au(); au_obj.family_name( '???' ); - - } - obj.list.append( - { - 'row' : { - 'my' : { - 'au' : au_obj, - 'hr' : hold_capture.hold, - 'circ' : hold_capture.circ, - 'mvr' : hold_capture.record, - 'acp' : hold_capture.copy, - 'route_to' : hold_capture.route_to, - 'message' : hold_capture.message, - } - } - //I could override map_row_to_column here - } - ); - - try { - alert(document.getElementById('circStrings').getString('staff.circ.hold_capture.print.to_printer') + '\n' + hold_capture.text + '\r\n' + - document.getElementById('circStrings').getString('staff.circ.hold_capture.print.barcode') + ' ' + barcode + - document.getElementById('circStrings').getString('staff.circ.hold_capture.print.title') + ' ' + hold_capture.record.title() + - document.getElementById('circStrings').getString('staff.circ.hold_capture.print.author') + ' ' + hold_capture.record.author() + '\r\n' + - document.getElementById('circStrings').getString('staff.circ.hold_capture.print.route_to') + ' ' + hold_capture.route_to + - document.getElementById('circStrings').getString('staff.circ.hold_capture.print.patron') + ' ' + au_obj.card().barcode() + ' ' + au_obj.family_name() + ', ' + au_obj.first_given_name() + - '\r\n'); //FIXME - } catch(E) { dump('errors\n'); } - /* - sPrint(hold_capture.text + '
\r\n' + 'Barcode: ' + barcode + ' Title: ' + hold_capture.record.title() + - ' Author: ' + hold_capture.record.author() + '
\r\n' + - 'Route To: ' + hold_capture.route_to + - ' Patron: ' + au_obj.card().barcode() + ' ' + au_obj.family_name() + ', ' + au_obj.first_given_name() + - '
\r\n' - ); - */ - - if (typeof obj.on_hold_capture == 'function') { - obj.on_hold_capture(hold_capture); - } - if (typeof window.xulG == 'object' && typeof window.xulG.on_hold_capture == 'function') { - obj.error.sdump('D_CIRC', document.getElementById('circStrings').getString('staff.circ.hold_capture.calling_external') + '\n'); - window.xulG.on_hold_capture(hold_capture); - } else { - obj.error.sdump('D_CIRC', document.getElementById('circStrings').getString('staff.circ.hold_capture.no_external') + '\n'); - } - } else { - throw(document.getElementById('circStrings').getString('staff.circ.hold_capture.capture_failed')); - } - - } catch(E) { - alert(document.getElementById('circStrings').getString('staff.circ.hold_capture.error') + '\n' - + js2JSON(E)); - if (typeof obj.on_failure == 'function') { - obj.on_failure(E); - } - if (typeof window.xulG == 'object' && typeof window.xulG.on_failure == 'function') { - obj.error.sdump('D_CIRC', document.getElementById('circStrings').getString('staff.circ.hold_capture.calling_external') + '\n'); - window.xulG.on_failure(E); - } else { - obj.error.sdump('D_CIRC', document.getElementById('circStrings').getString('staff.circ.hold_capture.no_external') + '\n'); - } - } - - }, - - 'on_hold_capture' : function() { - this.controller.view.hold_capture_barcode_entry_textbox.value = ''; - this.controller.view.hold_capture_barcode_entry_textbox.focus(); - }, - - 'on_failure' : function() { - this.controller.view.hold_capture_barcode_entry_textbox.select(); - this.controller.view.hold_capture_barcode_entry_textbox.focus(); - } -} - -dump('exiting circ.hold_capture.js\n'); diff --git a/Open-ILS/xul/staff_client/server/circ/hold_capture.xul b/Open-ILS/xul/staff_client/server/circ/hold_capture.xul deleted file mode 100644 index 4699977a53..0000000000 --- a/Open-ILS/xul/staff_client/server/circ/hold_capture.xul +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Open-ILS/xul/staff_client/server/circ/hold_capture_overlay.xul b/Open-ILS/xul/staff_client/server/circ/hold_capture_overlay.xul deleted file mode 100644 index 236e64374a..0000000000 --- a/Open-ILS/xul/staff_client/server/circ/hold_capture_overlay.xul +++ /dev/null @@ -1,56 +0,0 @@ - - -]> - - - - - - - - - - - - - - - - - - - - -