From: phasefx Date: Fri, 13 Aug 2010 08:17:36 +0000 (+0000) Subject: add title to item notes window and an accesskey for closing the window. Spawn the... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e4ece363a747b0688eefa0a0f2ce3574558d1112;p=evergreen%2Fbjwebb.git 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@17207 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/cat/copy_notes.xul b/Open-ILS/xul/staff_client/server/cat/copy_notes.xul index f04987af4..86dfe782d 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_notes.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_notes.xul @@ -22,6 +22,7 @@ @@ -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();'); } diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js index 06f05a4de..c7d8d14fa 100644 --- a/Open-ILS/xul/staff_client/server/cat/util.js +++ b/Open-ILS/xul/staff_client/server/cat/util.js @@ -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; diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties index 974d63965..d31f2dfe9 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties @@ -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