removing dead code.. Hold Capture interface is a variant of Check In interface
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Feb 2008 04:00:28 +0000 (04:00 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 13 Feb 2008 04:00:28 +0000 (04:00 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8740 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/hold_capture.js [deleted file]
Open-ILS/xul/staff_client/server/circ/hold_capture.xul [deleted file]
Open-ILS/xul/staff_client/server/circ/hold_capture_overlay.xul [deleted file]

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 (file)
index 3c65993..0000000
+++ /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 + '<br />\r\n' + 'Barcode: ' + barcode + '  Title: ' + hold_capture.record.title() + 
-                                       '  Author: ' + hold_capture.record.author() + '<br />\r\n' +
-                                       'Route To: ' + hold_capture.route_to + 
-                                       '  Patron: ' + au_obj.card().barcode() + ' ' + au_obj.family_name() + ', ' + au_obj.first_given_name() + 
-                                       '<br />\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 (file)
index 4699977..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Application: Evergreen Staff Client -->
-<!-- Screen: Patron Display -->
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- STYLESHEETS -->
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="/xul/server/skin/circ.css" type="text/css"?>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- LOCALIZATION -->
-<!DOCTYPE window PUBLIC "" ""[
-       <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
-]>
-
-<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-<!-- OVERLAYS -->
-<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
-<?xul-overlay href="/xul/server/circ/hold_capture_overlay.xul"?>
-
-<window id="hold_capture_win" 
-       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
-       <!-- BEHAVIOR -->
-        <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
-        <scripts id="openils_util_scripts"/>
-
-       <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
-       <script>
-       <![CDATA[
-               function my_init() {
-                       try {
-                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                               if (typeof JSAN == 'undefined') {
-                                       throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
-                               }
-                               JSAN.errorLevel = "die"; // none, warn, or die
-                               JSAN.addRepository('/xul/server/');
-                               JSAN.use('util.error'); g.error = new util.error();
-                               g.error.sdump('D_TRACE','my_init() for hold_capture.xul');
-
-                               JSAN.use('circ.hold_capture'); g.hold_capture = new circ.hold_capture();
-                               g.hold_capture.init( 
-                                       { 
-                                       } 
-                               );
-       
-                               if (typeof window.xulG == 'object' && typeof window.xulG.set_tab_name == 'function') {
-                                       try { window.xulG.set_tab_name('Hold Capture'); } catch(E) { alert(E); }
-                               }
-
-                       } catch(E) {
-                               var err_msg = document.getElementById("commonStrings").getFormattedString('common.exception', ['circ.hold_capture.xul', E]);
-                               try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
-                               alert(err_msg);
-                       }
-               }
-
-       ]]>
-       </script>
-
-       <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties" />
-
-       <commandset id="hold_capture_cmds">
-               <command id="cmd_hold_capture_submit_barcode" />
-               <command id="cmd_hold_capture_print" />
-               <command id="cmd_hold_capture_reprint" />
-               <command id="cmd_hold_capture_done" />
-       </commandset>
-
-       <box id="hold_capture_main" />
-
-</window>
-
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 (file)
index 236e643..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE overlay PUBLIC "" ""[
-       <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
-]>
-<overlay id="hold_capture_overlay" 
-       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script>dump('loading hold_capture_overlay.xul\n');</script>
-
-<commandset id="hold_capture_cmds" />
-
-<box id="hold_capture_main" flex="1" orient="vertical" class="my_overflow">
-       <vbox id="cmvb1" flex="1"/>
-</box>
-
-<vbox id="cmvb1" flex="1">
-       <groupbox id="cmgb1" flex="2">
-               <caption label="&staff.circ.hold_capture.caption;" />
-               <hbox id="hold_capture_top_ui" />
-               <tree id="hold_capture_list" flex="1" enableColumnDrag="true"/>
-               <hbox id="hold_capture_bottom_ui" />
-       </groupbox>
-</vbox>
-
-<hbox id="hold_capture_top_ui">
-       <label id="hold_capture_scan_barcode_label" 
-               value="&staff.circ.hold_capture.scan_label;" 
-               accesskey="&staff.circ.hold_capture.scan_label.accesskey;" 
-               control="hold_capture_barcode_entry_textbox"/>
-       <textbox id="hold_capture_barcode_entry_textbox"/>
-       <button id="hold_capture_submit_barcode_button" 
-               label="&staff.circ.hold_capture.submit_label;" 
-               command="cmd_hold_capture_submit_barcode"
-               accesskey="&staff.circ.hold_capture.submit_label.accesskey;"/>
-</hbox>
-
-<hbox id="hold_capture_bottom_ui">
-       <button id="hold_capture_print" 
-               label="&staff.hold_capture.print_receipt_label;" 
-               command="cmd_hold_capture_print"
-               accesskey="&staff.hold_capture.print_receipt_label.accesskey;"/>
-       <button id="hold_capture_reprint" 
-               label="&staff.hold_capture.reprint_receipt_label;" 
-               command="cmd_hold_capture_reprint"
-               accesskey="&staff.hold_capture.reprint_receipt_label.accesskey;"/>
-       <spacer id="pcii3s" flex="1"/>
-       <checkbox id="hold_capture_auto" 
-               label="&staff.hold_capture.auto_print_label;" 
-               accesskey="&staff.hold_capture.auto_print_label.accesskey;"/> 
-       <button id="hold_capture_done" 
-               label="&staff.hold_capture.done_label;" 
-               command="cmd_hold_capture_done"
-               accesskey="&staff.hold_capture.done_label.accesskey;"/>
-</hbox>
-
-</overlay>