From: senator Date: Thu, 25 Mar 2010 13:31:27 +0000 (+0000) Subject: Acq: Fixed fund dropdowns for new copies and copies without funds. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7f91f70829e363f0c04960076b6d88254cf432e9;p=evergreen%2Fmasslnc.git Acq: Fixed fund dropdowns for new copies and copies without funds. Now these dropdowns, too, exclude inactive funds. git-svn-id: svn://svn.open-ils.org/ILS/trunk@15973 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 4ce142fb05..7f49c95749 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 @@ -1221,13 +1221,20 @@ function AcqLiTable() { 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],