[open-ils-commits] r15973 - trunk/Open-ILS/web/js/ui/default/acq/common (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 25 09:31:29 EDT 2010


Author: senator
Date: 2010-03-25 09:31:27 -0400 (Thu, 25 Mar 2010)
New Revision: 15973

Modified:
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
Log:
Acq: Fixed fund dropdowns for new copies and copies without funds.

Now these dropdowns, too, exclude inactive funds.


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-25 13:31:06 UTC (rev 15972)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-03-25 13:31:27 UTC (rev 15973)
@@ -1221,13 +1221,20 @@
 
         dojo.forEach(liDetailFields,
             function(field) {
+                var searchFilter;
+                if (field == "fund") {
+                    searchFilter = (copy.fund() ?
+                        {"-or": {"active": "t", "id": copy.fund()}} :
+                        {"active" : "t"});
+                } else {
+                    searchFilter = null;
+                }
                 var widget = new openils.widget.AutoFieldWidget({
                     fmObject : copy,
                     fmField : field,
                     labelFormat : (field == 'fund') ? fundLabelFormat : null,
                     searchFormat : (field == 'fund') ? fundSearchFormat : null,
-                    searchFilter : (field == "fund" && copy.fund()) ?
-                        {"-or": {"active": "t", "id": copy.fund()}} : null,
+                    searchFilter : searchFilter,
                     noCache: true,
                     fmClass : 'acqlid',
                     parentNode : dojo.query('[name='+field+']', row)[0],



More information about the open-ils-commits mailing list