From cd8c5f9ce881b2ba4a80d3fa471ba55cb13c6ac8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 4 Aug 2017 11:54:15 -0400 Subject: [PATCH] LP#1463166 Apply funds from view/place orders and search Activate the copy-specific fund selectors for lineitems accessed from the View/Place orders and MARC Federated Search interfaces. Prior to this, fund selectors existed, but could not accept values until after a PO was created for a given lineitem. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 10 +++++++--- Open-ILS/web/js/ui/default/acq/lineitem/related.js | 4 ++++ Open-ILS/web/js/ui/default/acq/picklist/bib_search.js | 4 ++++ 3 files changed, 15 insertions(+), 3 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 071209359b..7c19fef1cf 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 @@ -197,9 +197,13 @@ function AcqLiTable() { /* This is the "new" batch updater that sits atop all lineitems. It does * use this.afwCopyFieldArgs() to borrow a little common code from the - * "old" batch updater atop the copy details view. */ - this.initBatchUpdater = function(disabled_fields) { - openils.Util.show("acq-batch-update", "table"); + * "old" batch updater atop the copy details view. + * @param hidden allows the batch updater to be initialized, activating + * fund selectors, while stying invisible for UI's where the batch + * updater is not fully integrated. + * */ + this.initBatchUpdater = function(disabled_fields, hidden) { + if (!hidden) openils.Util.show("acq-batch-update", "table"); if (!dojo.isArray(disabled_fields)) disabled_fields = []; diff --git a/Open-ILS/web/js/ui/default/acq/lineitem/related.js b/Open-ILS/web/js/ui/default/acq/lineitem/related.js index 9ae3c5f350..c2ee738e4c 100644 --- a/Open-ILS/web/js/ui/default/acq/lineitem/related.js +++ b/Open-ILS/web/js/ui/default/acq/lineitem/related.js @@ -147,6 +147,10 @@ function load() { liTable.reset(); liTable._isRelatedViewer = true; + // render the batch updater to activate fund selection, but leave + // it hidden for now since it's not fully functional in this UI. + liTable.initBatchUpdater(null, true); + prepareButtons(); fetchRelated(); diff --git a/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js index f0fa454cde..46a4180d0e 100644 --- a/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/bib_search.js @@ -28,6 +28,10 @@ function drawForm() { liTable.enableActionsDropdownOptions("fs"); liTable.skipInitialEligibilityCheck = true; + // render the batch updater to activate fund selection, but leave + // it hidden for now since it's not fully functional in this UI. + liTable.initBatchUpdater(null, true); + fieldmapper.standardRequest( ['open-ils.search', 'open-ils.search.z3950.retrieve_services'], { async: true, -- 2.43.2