add title to item notes window and an accesskey for closing the window. Spawn the...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Aug 2010 08:17:36 +0000 (08:17 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 13 Aug 2010 08:17:36 +0000 (08:17 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17207 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_notes.xul
Open-ILS/xul/staff_client/server/cat/util.js
Open-ILS/xul/staff_client/server/locale/en-US/cat.properties

index f04987a..86dfe78 100644 (file)
@@ -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">
 
                     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();');
             }
 
index 06f05a4..c7d8d14 100644 (file)
@@ -746,6 +746,7 @@ cat.util.mark_item_as_missing_pieces = function(copy_ids) {
         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 @@ cat.util.mark_item_as_missing_pieces = function(copy_ids) {
                     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;
index 974d639..d31f2df 100644 (file)
@@ -205,6 +205,7 @@ staff.cat.copy_notes.delete_note.prompt.yes=Yes
 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.ms_confirm_action=Check here to confirm
 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