LP#1463166 Fix Batch update of Funds in Selection Lists
authorLiam Whalen <liam.whalen@bc.libraries.coop>
Sat, 19 Sep 2015 03:24:14 +0000 (20:24 -0700)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 8 Aug 2017 15:02:27 +0000 (11:02 -0400)
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 <liam.whalen@bc.libraries.coop>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/js/ui/default/acq/picklist/view.js

index 44e7b97..0712093 100644 (file)
@@ -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
index 05bf842..616eb92 100644 (file)
@@ -14,6 +14,7 @@ var liTable;
 function load() {
     liTable = new AcqLiTable();
     liTable.isPL = plId;
+    liTable.initBatchUpdater();
     liTable.enableActionsDropdownOptions("pl");
 
     fieldmapper.standardRequest(