From a5e26bea3932eeb2a736c344492253c2979451d2 Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 13 Nov 2009 19:31:18 +0000 Subject: [PATCH] UI entry points for Triggered Events from Item Status and Items Out git-svn-id: svn://svn.open-ils.org/ILS/trunk@14910 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/locale/en-US/lang.dtd | 4 ++ .../xul/staff_client/server/circ/copy_status.js | 22 +++++++++++ .../xul/staff_client/server/circ/copy_status.xul | 1 + .../server/circ/copy_status_overlay.xul | 2 + .../server/locale/en-US/common.properties | 2 +- Open-ILS/xul/staff_client/server/patron/items.js | 46 ++++++++++++++++++++++ .../staff_client/server/patron/items_overlay.xul | 6 +++ 7 files changed, 82 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 1a2e394a92..1ce9795a22 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1891,6 +1891,8 @@ + + @@ -2806,6 +2808,8 @@ + + diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.js b/Open-ILS/xul/staff_client/server/circ/copy_status.js index ab1bd139c8..caed154c96 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.js +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.js @@ -63,6 +63,7 @@ circ.copy_status.prototype = { obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','true'); obj.controller.view.sel_mark_items_missing.setAttribute('disabled','true'); obj.controller.view.sel_patron.setAttribute('disabled','true'); + obj.controller.view.cmd_triggered_events.setAttribute('disabled','true'); obj.controller.view.sel_spine.setAttribute('disabled','true'); obj.controller.view.sel_transit_abort.setAttribute('disabled','true'); obj.controller.view.sel_clip.setAttribute('disabled','true'); @@ -82,6 +83,7 @@ circ.copy_status.prototype = { obj.controller.view.sel_edit.setAttribute('disabled','false'); obj.controller.view.sel_opac.setAttribute('disabled','false'); obj.controller.view.sel_patron.setAttribute('disabled','false'); + obj.controller.view.cmd_triggered_events.setAttribute('disabled','false'); obj.controller.view.sel_bucket.setAttribute('disabled','false'); obj.controller.view.sel_copy_details.setAttribute('disabled','false'); obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','false'); @@ -162,6 +164,26 @@ circ.copy_status.prototype = { } }, ], + 'cmd_triggered_events' : [ + ['command'], + function() { + try { + for (var i = 0; i < obj.selection_list.length; i++) { + xulG.new_tab( + urls.XUL_TRIGGER_EVENTS, + { + 'tab_name' : document.getElementById('commonStrings').getFormattedString('tab.label.triggered_events_for_copy',[ obj.selection_list[i].barcode ]) + }, + { + 'copy_id' : obj.selection_list[i].copy_id + } + ); + } + } catch(E) { + alert('Error in copy_status.js, cmd_triggered_events: ' + E); + } + } + ], 'sel_checkin' : [ ['command'], function() { diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.xul b/Open-ILS/xul/staff_client/server/circ/copy_status.xul index 9f77af71f1..de1ccc2043 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.xul @@ -101,6 +101,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul index f6a50b76bc..a419f41291 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul @@ -117,6 +117,7 @@ + @@ -147,6 +148,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties index 1b01f6f386..cc1bde469c 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties @@ -187,4 +187,4 @@ staff.main.gen_offline_widgets.registration.success=Registration successful staff.util.timestamp_dialog.future_date_disallowed=Future dates disallowed. staff.util.timestamp_dialog.past_date_disallowed=Past dates disallowed. staff.util.timestamp_dialog.today_disallowed=Today disallowed. - +tab.label.triggered_events_for_copy=Triggered Events: %1$s diff --git a/Open-ILS/xul/staff_client/server/patron/items.js b/Open-ILS/xul/staff_client/server/patron/items.js index d2973adf1e..4e794c84b1 100644 --- a/Open-ILS/xul/staff_client/server/patron/items.js +++ b/Open-ILS/xul/staff_client/server/patron/items.js @@ -33,6 +33,48 @@ patron.items.prototype = { 'sel_clip' : [ ['command'], function() { obj.list.clipboard(); } ], 'sel_clip2' : [ ['command'], function() { obj.list2.clipboard(); } ], 'sel_patron' : [ ['command'], function() { JSAN.use('circ.util'); circ.util.show_last_few_circs(obj.retrieve_ids); } ], + 'cmd_triggered_events' : [ + ['command'], + function() { + try { + var copy_ids = util.functional.map_list( obj.retrieve_ids, function(o) { return o.copy_id; } ); + var barcodes = util.functional.map_list( obj.retrieve_ids, function(o) { return o.barcode; } ); + for (var i = 0; i < copy_ids.length; i++) { + xulG.new_tab( + urls.XUL_TRIGGER_EVENTS, + { + 'tab_name' : document.getElementById('commonStrings').getFormattedString('tab.label.triggered_events_for_copy',[ barcodes[i] ]) + }, + { + 'copy_id' : copy_ids[i] + } + ); + } + } catch(E) { + alert('Error in copy_status.js, cmd_triggered_events: ' + E); + } + } + ], + 'cmd_triggered_events2' : [ + ['command'], + function() { + try { + var copy_ids = util.functional.map_list( obj.retrieve_ids2, function(o) { return o.copy_id; } ); + for (var i = 0; i < copy_ids.length; i++) { + xulG.new_tab( + urls.XUL_TRIGGER_EVENTS, + {}, + { + 'copy_id' : copy_ids[i] + } + ); + } + } catch(E) { + alert('Error in copy_status.js, cmd_triggered_events: ' + E); + } + } + ], + 'sel_bucket' : [ ['command'], function() { @@ -126,8 +168,10 @@ patron.items.prototype = { obj.controller.view.sel_bucket2.setAttribute('disabled','true'); obj.controller.view.sel_copy_details.setAttribute('disabled','true'); obj.controller.view.sel_patron.setAttribute('disabled','true'); + obj.controller.view.cmd_triggered_events.setAttribute('disabled','true'); obj.controller.view.sel_copy_details2.setAttribute('disabled','true'); obj.controller.view.sel_patron2.setAttribute('disabled','true'); + obj.controller.view.cmd_triggered_events2.setAttribute('disabled','true'); obj.controller.view.cmd_items_claimed_returned.setAttribute('disabled','true'); obj.controller.view.cmd_items_renew.setAttribute('disabled','true'); obj.controller.view.cmd_items_renew_with_date.setAttribute('disabled','true'); @@ -871,6 +915,7 @@ patron.items.prototype = { obj.controller.view.sel_copy_details.setAttribute('disabled','false'); obj.controller.view.sel_bucket.setAttribute('disabled','false'); obj.controller.view.sel_patron.setAttribute('disabled','false'); + obj.controller.view.cmd_triggered_events.setAttribute('disabled','false'); obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','false'); obj.controller.view.sel_mark_items_missing.setAttribute('disabled','false'); @@ -893,6 +938,7 @@ patron.items.prototype = { obj.controller.view.sel_copy_details2.setAttribute('disabled','false'); obj.controller.view.sel_bucket2.setAttribute('disabled','false'); obj.controller.view.sel_patron2.setAttribute('disabled','false'); + obj.controller.view.cmd_triggered_events2.setAttribute('disabled','false'); obj.controller.view.sel_mark_items_damaged2.setAttribute('disabled','false'); obj.controller.view.sel_mark_items_missing2.setAttribute('disabled','false'); diff --git a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul index b1b5b95dfa..78f9ce3a9b 100644 --- a/Open-ILS/xul/staff_client/server/patron/items_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/items_overlay.xul @@ -13,6 +13,7 @@ + @@ -34,6 +35,7 @@ + @@ -57,6 +59,7 @@ + @@ -75,6 +78,7 @@ + @@ -129,6 +133,7 @@ + @@ -155,6 +160,7 @@ + -- 2.11.0