From 47f48c33b79bd8dec079ebc0f474ecc1d3aaf0d8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 26 Sep 2011 12:56:17 -0400 Subject: [PATCH] TPac: MFHD staff client actions integration Populdate the necessary window.mfhdDetails data for the staff client and fire the mfhdDrawn event Signed-off-by: Bill Erickson Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/parts/js.tt2 | 38 +++++++++++++++++------- Open-ILS/web/js/ui/default/opac/staff.js | 6 ++-- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2 index c0b2e70603..6eaf150b6a 100644 --- a/Open-ILS/src/templates/opac/parts/js.tt2 +++ b/Open-ILS/src/templates/opac/parts/js.tt2 @@ -5,17 +5,33 @@ [%- IF ctx.is_staff %] - [% IF ctx.page == 'record' AND ctx.search_result_index >= 0 %] - + [% IF ctx.page == 'record' %] + [% IF ctx.search_result_index >= 0 %] + + [% END %] + [% IF ctx.mfhd_summaries.size %] + + [% END %] [% END %] [%- END %] diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js index 5521e5063b..b952cef7d4 100644 --- a/Open-ILS/web/js/ui/default/opac/staff.js +++ b/Open-ILS/web/js/ui/default/opac/staff.js @@ -21,8 +21,10 @@ function staff_hold_usr_input_disabler(input) { window.onload = function() { // record details page events var rec = location.href.match(/\/opac\/record\/(\d+)/); - if(rec && rec[1]) { runEvt('rdetail', 'recordRetrieved', rec[1]); } - // fire other events the staff client is expecting... + if(rec && rec[1]) { + runEvt('rdetail', 'recordRetrieved', rec[1]); + runEvt('rdetail', 'MFHDDrawn'); + } } function rdetail_next_prev_actions(index, count, prev, next, start, end) { -- 2.43.2