[open-ils-commits] r17207 - in trunk/Open-ILS/xul/staff_client/server: cat locale/en-US (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Aug 13 04:17:41 EDT 2010


Author: phasefx
Date: 2010-08-13 04:17:36 -0400 (Fri, 13 Aug 2010)
New Revision: 17207

Modified:
   trunk/Open-ILS/xul/staff_client/server/cat/copy_notes.xul
   trunk/Open-ILS/xul/staff_client/server/cat/util.js
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
Log:
add title to item notes window and an accesskey for closing the window.  Spawn the item note window during the Mark Item Missing Pieces workflow


Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_notes.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_notes.xul	2010-08-13 04:07:48 UTC (rev 17206)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_notes.xul	2010-08-13 08:17:36 UTC (rev 17207)
@@ -22,6 +22,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="copy_notes_win" width="700" height="550"
+    title="&staff.cat.copy_editor.copy_notes.label;"
     onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
@@ -145,6 +146,7 @@
                     var spacer = document.createElement('spacer'); hb.appendChild(spacer); spacer.flex = 1;
                     var btn2 = document.createElement('button'); hb.appendChild(btn2);
                         btn2.setAttribute('label', $('catStrings').getString('staff.cat.copy_notes.delete_note.close_window'));
+                        btn2.setAttribute('accesskey', $('catStrings').getString('staff.cat.copy_notes.delete_note.close_window.accesskey'));
                         btn2.setAttribute('oncommand','window.close();');
             }
 

Modified: trunk/Open-ILS/xul/staff_client/server/cat/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/util.js	2010-08-13 04:07:48 UTC (rev 17206)
+++ trunk/Open-ILS/xul/staff_client/server/cat/util.js	2010-08-13 08:17:36 UTC (rev 17207)
@@ -746,6 +746,7 @@
         JSAN.use('util.functional'); JSAN.use('util.date');
         JSAN.use('util.network'); var network = new util.network();
         JSAN.use('util.print'); var print = new util.print();
+        JSAN.use('util.window'); var win = new util.window();
         var copies = network.simple_request('FM_ACP_FLESHED_BATCH_RETRIEVE.authoritative', [ copy_ids ]);
         if (typeof copies.ilsevent != 'undefined') throw(copies);
 
@@ -762,26 +763,34 @@
                     var robj = network.simple_request('MARK_ITEM_MISSING_PIECES',[ses(),copies[i].id()]);
                     if (typeof robj.ilsevent != 'undefined') {
                         if (robj.ilsevent == 0 /* SUCCESS */) {
+                            count++;
+                            // Print Slip
                             if (robj.payload && robj.payload.slip) {
                                 print.simple( robj.payload.slip.template_output().data() );
                             }
-                            // TODO: Item/patron notes/messages
+                            // Item Note
+                            win.open(
+                                urls.XUL_COPY_NOTES,
+                                $("catStrings").getString("staff.cat.copy_editor.copy_notes"),
+                                'chrome,resizable,modal',
+                                { 'copy_id' : copies[i].id() }
+                            );
+                            // TODO: patron notes/messages
                             // TODO: Invoke 3rd party app with letter to patron
                         } else if (robj.ilsevent == 1500 /* ACTION_CIRCULATION_NOT_FOUND */) {
-                            throw(robj);
+                            alert( $("catStrings").getFormattedString('staff.cat.util.mark_item_missing_pieces.circ_not_found',[ copies[i].barcode() ]) );
                         } else {
                             throw(robj);
                         }
                     } else {
                         throw(robj);
                     }
-                    count++;
                 } catch(E) {
                     error.standard_unexpected_error_alert($("catStrings").getFormattedString('staff.cat.util.mark_item_missing_pieces.marking_error', [copies[i].barcode()]),E);
                 }
             }
-            alert(count == 1 ? $("catStrings").getString('staff.cat.util.mark_item_missing_pieces.one_item_missing_pieces') :
-                $("catStrings").getFormattedString('staff.cat.util.mark_item_missing_pieces.multiple_item_missing_pieces', [count]));
+            /*alert(count == 1 ? $("catStrings").getString('staff.cat.util.mark_item_missing_pieces.one_item_missing_pieces') :
+                $("catStrings").getFormattedString('staff.cat.util.mark_item_missing_pieces.multiple_item_missing_pieces', [count]));*/
         }
 
         return true;

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties	2010-08-13 04:07:48 UTC (rev 17206)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties	2010-08-13 08:17:36 UTC (rev 17207)
@@ -205,6 +205,7 @@
 staff.cat.copy_notes.delete_note.prompt.no=No
 staff.cat.copy_notes.delete_note.success=Note deleted.
 staff.cat.copy_notes.delete_note.close_window=Close Window
+staff.cat.copy_notes.delete_note.close_window.accesskey=W
 staff.cat.copy_notes.new_note.label=New Note
 staff.cat.copy_notes.new_note.public=Public?
 staff.cat.copy_notes.new_note.title=Title
@@ -386,6 +387,7 @@
 staff.cat.util.mark_item_missing_pieces.marking_error=Error marking item %1$s as missing pieces.
 staff.cat.util.mark_item_missing_pieces.one_item_missing_pieces=Item marked as missing pieces.
 staff.cat.util.mark_item_missing_pieces.multiple_item_missing_pieces=%1$s items marked as missing pieces.
+staff.cat.util.mark_item_missing_pieces.circ_not_found=No circulation found for item with barcode %1$s.  Item left unmodified.
 
 staff.cat.volume_buckets.window_tab_name=Volume Buckets
 staff.cat.volume_copy_creator.my_init.btn.label=Apply



More information about the open-ils-commits mailing list