[open-ils-commits] r15964 - in trunk/Open-ILS/web/js: dojo/openils/widget ui/default/acq/common (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 24 17:18:04 EDT 2010


Author: senator
Date: 2010-03-24 17:17:58 -0400 (Wed, 24 Mar 2010)
New Revision: 15964

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
Log:
Acq: limit "Fund" dropdowns in LID table to active funds

A dropdown will still include one inactive fund if the dropdown belongs to a
copy row whose fund has become inactive (but presumably wasn't originally
inactive).


Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-03-24 20:46:31 UTC (rev 15963)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-03-24 21:17:58 UTC (rev 15964)
@@ -443,7 +443,7 @@
                 self._widgetLoaded();
             };
 
-            if(this.cache[self.auth].list[linkClass]) {
+            if(!this.noCache && this.cache[self.auth].list[linkClass]) {
                 oncomplete();
 
             } else {

Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-03-24 20:46:31 UTC (rev 15963)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-03-24 21:17:58 UTC (rev 15964)
@@ -1128,6 +1128,7 @@
                         fmClass : 'acqlid',
                         labelFormat : (field == 'fund') ? fundLabelFormat : null,
                         searchFormat : (field == 'fund') ? fundSearchFormat : null,
+                        searchFilter : (field == 'fund') ? {"active": "t"} : null,
                         parentNode : dojo.query('[name='+field+']', row)[0],
                         orgLimitPerms : ['CREATE_PICKLIST'],
                         dijitArgs : {required:false},
@@ -1225,6 +1226,9 @@
                     fmField : field,
                     labelFormat : (field == 'fund') ? fundLabelFormat : null,
                     searchFormat : (field == 'fund') ? fundSearchFormat : null,
+                    searchFilter : (field == "fund" && copy.fund()) ?
+                        {"-or": {"active": "t", "id": copy.fund()}} : null,
+                    noCache: true,
                     fmClass : 'acqlid',
                     parentNode : dojo.query('[name='+field+']', row)[0],
                     orgLimitPerms : ['CREATE_PICKLIST', 'CREATE_PURCHASE_ORDER'],



More information about the open-ils-commits mailing list