change the Already checked in alert to a label warning
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Aug 2006 05:49:32 +0000 (05:49 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Aug 2006 05:49:32 +0000 (05:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5773 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
Open-ILS/xul/staff_client/server/circ/util.js

index 28c0bc9..292d995 100644 (file)
 </vbox>
 
 <hbox id="checkin_top_ui">
-       <label id="checkin_scan_barcode_label" 
-               value="&staff.circ.checkin.scan_label;" 
-               accesskey="&staff.circ.checkin.scan_label.accesskey;" 
-               control="checkin_barcode_entry_textbox"/>
-       <textbox id="checkin_barcode_entry_textbox"/>
-       <button id="checkin_submit_barcode_button" 
-               label="&staff.circ.checkin.submit_label;" 
-               command="cmd_checkin_submit_barcode"
-               oldaccesskey="&staff.circ.checkin.submit_label.accesskey;"/>
+       <vbox>
+               <hbox>
+                       <label id="checkin_scan_barcode_label" 
+                               value="&staff.circ.checkin.scan_label;" 
+                               accesskey="&staff.circ.checkin.scan_label.accesskey;" 
+                               control="checkin_barcode_entry_textbox"/>
+                       <textbox id="checkin_barcode_entry_textbox"/>
+                       <button id="checkin_submit_barcode_button" 
+                               label="&staff.circ.checkin.submit_label;" 
+                               command="cmd_checkin_submit_barcode"
+                               oldaccesskey="&staff.circ.checkin.submit_label.accesskey;"/>
+               </hbox>
+               <label id="no_change_label" value="" style="color: red" hidden="true"/>
+       </vbox>
        <spacer flex="1"/>
-       <hbox id="checkin_effective_date_hbox">
-               <label id="checkin_effective_date_label" value="Effective Date:" control="checkin_effective_date_textbox" accesskey="D"/>
-               <textbox id="checkin_effective_date_textbox"/>
-       </hbox>
-       <menubar>
-       <menu label="Actions for Selected Items" accesskey="S">
-               <menupopup>
-                       <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
-                       <menuitem command="sel_bucket" label="Add to Item Bucket" accesskey="A"/>
-                       <menuitem command="sel_opac" label="Show in Catalog" accesskey="S" />
-                       <menuitem command="sel_copy_details" label="Show Item Details" accesskey="I" />
-                       <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
-                       <menuseparator />
-                       <menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
-                       <menuitem command="sel_transit_abort" label="Abort Transits" />
-                       <menuseparator />
-                       <menuitem command="sel_spine" label="Print Spine Label" accesskey="P"/>
-                       <menuseparator />
-                       <menuitem command="save_columns" label="Save Columns"/>
-               </menupopup>
-       </menu>
-       </menubar>
-
+       <vbox>
+               <hbox>
+                       <hbox id="checkin_effective_date_hbox">
+                               <label id="checkin_effective_date_label" value="Effective Date:" control="checkin_effective_date_textbox" accesskey="D"/>
+                               <textbox id="checkin_effective_date_textbox"/>
+                       </hbox>
+                       <menubar>
+                       <menu label="Actions for Selected Items" accesskey="S">
+                               <menupopup>
+                                       <menuitem command="sel_clip" label="Copy to Clipboard" accesskey="C" />
+                                       <menuitem command="sel_bucket" label="Add to Item Bucket" accesskey="A"/>
+                                       <menuitem command="sel_opac" label="Show in Catalog" accesskey="S" />
+                                       <menuitem command="sel_copy_details" label="Show Item Details" accesskey="I" />
+                                       <menuitem command="sel_patron" label="Show Last Few Circulations" accesskey="L"/>
+                                       <menuseparator />
+                                       <menuitem command="sel_edit" label="Edit Item Attributes" accesskey="E" />
+                                       <menuitem command="sel_transit_abort" label="Abort Transits" />
+                                       <menuseparator />
+                                       <menuitem command="sel_spine" label="Print Spine Label" accesskey="P"/>
+                                       <menuseparator />
+                                       <menuitem command="save_columns" label="Save Columns"/>
+                               </menupopup>
+                       </menu>
+                       </menubar>
+               </hbox>
+       </vbox>
 
 </hbox>
 
index a0d8470..4a0634d 100644 (file)
@@ -855,12 +855,23 @@ circ.util.checkin_via_barcode = function(session,barcode,backdate,auto_print) {
 
                if (!check.route_to) check.route_to = '   ';
 
+               if (document.getElementById('no_change_label')) {
+                       document.getElementById('no_change_label').setAttribute('value','');
+                       document.getElementById('no_change_label').setAttribute('hidden','true');
+               }
+
                /* SUCCESS  /  NO_CHANGE  /  ITEM_NOT_CATALOGED */
                if (check.ilsevent == 0 || check.ilsevent == 3 || check.ilsevent == 1202) {
                        try { check.route_to = data.lookup('acpl', check.copy.location() ).name(); } catch(E) { msg += 'Please inform your helpdesk/developers of this error:\nFIXME: ' + E + '\n'; }
                        var msg = '';
-                       if (check.ilsevent == 3) msg = 'This item is already checked in.\n';
-                       if (check.ilsevent == 1202 && check.copy.status() != 11) {
+                       if (check.ilsevent == 3 /* NO_CHANGE */) {
+                               //msg = 'This item is already checked in.\n';
+                               if (document.getElementById('no_change_label')) {
+                                       document.getElementById('no_change_label').setAttribute('value',barcode + ' was already checked in.');
+                                       document.getElementById('no_change_label').setAttribute('hidden','false');
+                               }
+                       }
+                       if (check.ilsevent == 1202 /* ITEM_NOT_CATALOGED */ && check.copy.status() != 11) {
                                msg = 'Please inform your helpdesk/developers of this error:\nFIXME -- ITEM_NOT_CATALOGED event but copy status is '
                                        + (data.hash.ccs[ check.copy.status() ] ? data.hash.ccs[ check.copy.status() ].name() : check.copy.status().name() ) + '\n';
                        }