From 4d25d17f1425591c0614ccd6d6b0261b8539d610 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 17 Mar 2017 16:32:38 -0400 Subject: [PATCH] LP#1619703 Transfer ACQ lineitem XUL UI Support for marking a bib record as a lineitem transfer destination for the XUL client. Adds a new menu entry under the 'Actions For This Record' menu in the main bib record UI. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 13 +++++++++++-- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 ++ Open-ILS/xul/staff_client/chrome/content/cat/opac.js | 20 ++++++++++++++++++++ .../xul/staff_client/chrome/content/cat/opac.xul | 1 + .../chrome/locale/en-US/offline.properties | 1 + 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 3e4c502cb6..3804f0c412 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -749,8 +749,17 @@ function AcqLiTable() { this.transferLiToBib = function(li_id) { var self = this; - var target = openils.XUL.localStorage().getItem( - 'eg.cat.marked_lineitem_transfer_record'); + var target; + + if (openils.XUL.isXUL()) { + if (window.IAMBROWSER) { + target = openils.XUL.localStorage().getItem( + 'eg.cat.marked_lineitem_transfer_record'); + if (target) target = JSON2js(target); + } else { + target = openils.XUL.getStash().marked_record_for_li_transfer; + } + } if (!target) { alert(localeStrings.LI_TRANSFER_NO_TARGET); diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 6610dbb48e..1a9399c650 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -351,6 +351,8 @@ + + diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index 8a1d0d4b5c..eb40d031f7 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -971,6 +971,26 @@ function mark_for_hold_transfer() { } } +function mark_for_li_transfer() { + g.data.marked_record_for_li_transfer = docid; + g.data.stash('marked_record_for_li_transfer'); + + var mvr = g.network.simple_request( + 'MODS_SLIM_RECORD_RETRIEVE.authoritative',[docid]); + + var msg = $("offlineStrings").getFormattedString( + 'staff.cat.opac.marked_record_for_li_transfer_indicator.tcn.label', + [mvr.tcn()] + ); + + alert(msg); + + xulG.set_statusbar( + 3, msg, '', + gen_statusbar_click_handler('marked_record_for_li_transfer') + ); +} + function transfer_title_holds() { g.data.stash_retrieve(); var target = g.data.marked_record_for_hold_transfer; diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul index 8c39271d17..5390c9d74a 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul @@ -63,6 +63,7 @@