From ce1b7dd93e0230b5c789c0eb574417d591550238 Mon Sep 17 00:00:00 2001 From: Liam Whalen Date: Fri, 18 Sep 2015 20:24:14 -0700 Subject: [PATCH] LP#1463166 Fix Batch update of Funds in Selection Lists Selection lists are currently unable to batch update funds. The problem stems from the fact that the Fund selection list is not populated in the copy rows. New code used to limit the number of funds, in the dropdown list, to those funds available to the user was added for purchase orders. However, these changes were not added to Selection Lists. This code adds the new call to initBatchUpdater to the selection list code. Signed-off-by: Liam Whalen Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 6 +++--- Open-ILS/web/js/ui/default/acq/picklist/view.js | 1 + 2 files changed, 4 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 44e7b974c5..071209359b 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 @@ -168,7 +168,7 @@ function AcqLiTable() { this.setFundSearchFilter = function(callback) { new openils.User().getPermOrgList( - ['CREATE_PURCHASE_ORDER', 'MANAGE_FUND'], + ['CREATE_PURCHASE_ORDER', 'CREATE_PICKLIST', 'MANAGE_FUND'], function(orgs) { fundSearchFilter.org = orgs; if (callback) callback(); @@ -272,12 +272,12 @@ function AcqLiTable() { dojo.forEach( ["owning_lib","location","collection_code","circ_modifier","fund"], function(field) { - var args = self.afwCopyFieldArgs(field,"CREATE_PURCHASE_ORDER"); + var args = self.afwCopyFieldArgs(field, "CREATE_PURCHASE_ORDER"); args.parentNode = dojo.byId("acq-bu-" + field); if (field == 'fund') { // The list of funds can be huge. Before fetching - // funds for PO modification, see where the user has + // funds for PO or Selection LIst modification, see where the user has // perms and limit the retreived funds accordingly. // Note: This is the first instance of fund list // retrieval. All future fund list retrievals will diff --git a/Open-ILS/web/js/ui/default/acq/picklist/view.js b/Open-ILS/web/js/ui/default/acq/picklist/view.js index 05bf842310..616eb92ba6 100644 --- a/Open-ILS/web/js/ui/default/acq/picklist/view.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/view.js @@ -14,6 +14,7 @@ var liTable; function load() { liTable = new AcqLiTable(); liTable.isPL = plId; + liTable.initBatchUpdater(); liTable.enableActionsDropdownOptions("pl"); fieldmapper.standardRequest( -- 2.11.0