allow us to switch to the alt item status view even with no items selected or scanned...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 3 Sep 2009 08:31:47 +0000 (08:31 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 3 Sep 2009 08:31:47 +0000 (08:31 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13955 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/copy_status.js
Open-ILS/xul/staff_client/server/circ/copy_status.xul

index fe8dec8..53fc641 100644 (file)
@@ -54,7 +54,6 @@ circ.copy_status.prototype = {
                                                );
                                                obj.error.sdump('D_TRACE','circ/copy_status: selection list = ' + js2JSON(obj.selection_list) );
                                                if (obj.selection_list.length == 0) {
-                                                       obj.controller.view.cmd_alt_view.setAttribute('disabled','true');
                                                        obj.controller.view.sel_checkin.setAttribute('disabled','true');
                                                        obj.controller.view.cmd_replace_barcode.setAttribute('disabled','true');
                                                        obj.controller.view.sel_edit.setAttribute('disabled','true');
@@ -78,7 +77,6 @@ circ.copy_status.prototype = {
                                                        obj.controller.view.cmd_mark_library.setAttribute('disabled','true');
                                                        obj.controller.view.cmd_transfer_volume.setAttribute('disabled','true');
                                                } else {
-                                                       obj.controller.view.cmd_alt_view.setAttribute('disabled','false');
                                                        obj.controller.view.sel_checkin.setAttribute('disabled','false');
                                                        obj.controller.view.cmd_replace_barcode.setAttribute('disabled','false');
                                                        obj.controller.view.sel_edit.setAttribute('disabled','false');
@@ -145,13 +143,15 @@ circ.copy_status.prototype = {
                                     n.setAttribute('toggle','0');
                                     n.setAttribute('label', document.getElementById("circStrings").getString('staff.circ.copy_status.alt_view.label'));
                                     n.setAttribute('accesskey', document.getElementById("circStrings").getString('staff.circ.copy_status.alt_view.accesskey'));
-                                    //document.getElementById('results').focus();
+                                    obj.controller.view.copy_status_barcode_entry_textbox.focus();
                                 } else {
                                     document.getElementById('deck').selectedIndex = 1;
                                     n.setAttribute('toggle','1');
                                     n.setAttribute('label', document.getElementById("circStrings").getString('staff.circ.copy_status.list_view.label'));
                                     n.setAttribute('accesskey', document.getElementById("circStrings").getString('staff.circ.copy_status.list_view.accesskey'));
                                     netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+                                    obj.controller.view.copy_status_barcode_entry_textbox.focus();
+                                    if (obj.selection_list.length == 0) return;
                                     var f = obj.browser.get_content();
                                     xulG.barcode = obj.selection_list[0].barcode; 
                                     f.xulG = xulG;
index 5d9d2af..8d382e1 100644 (file)
                <command id="cmd_copy_status_submit_barcode" />
                <command id="cmd_copy_status_upload_file" />
                <command id="cmd_copy_status_print" />
-        <command id="cmd_alt_view" disabled="true" />
+        <command id="cmd_alt_view" />
                <command id="save_columns" />
                <command id="sel_copy_details" disabled="true"/>
                <command id="sel_mark_items_damaged" disabled="true"/>