LP#1329920: (follow-up) set searchFormat as well
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 2 Aug 2019 16:44:16 +0000 (12:44 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 2 Aug 2019 16:44:16 +0000 (12:44 -0400)
AutoFieldWidget's searchFormat (among other things) controls
the formatting of the selected value for a drop-down, so
this patch sets it for funds as well. This patch also tidys
up whitespace.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/web/js/ui/default/conify/global/acq/distribution_formula.js

index 2a44917..1b5b9ac 100644 (file)
@@ -17,7 +17,6 @@ var _collection_code_kludge_active = false;
 var fundSearchFilter = {active : 't'};
 var fundLabelFormat = ['${0} (${1})', 'code', 'year'];
 
-
 function gridDataLoader() {
     fListGrid.resetStore();
     fListGrid.showLoadProgressIndicator();
@@ -167,7 +166,8 @@ function addEntry(entry) {
                 fmField : field, 
                 fmObject : entry,
                 fmClass : 'acqdfe',
-               labelFormat: (field == 'fund') ? fundLabelFormat : null,
+                labelFormat: (field == 'fund') ? fundLabelFormat : null,
+                searchFormat: (field == 'fund') ? fundLabelFormat : null,
                 searchFilter : (field == 'fund') ? fundSearchFilter : null,
                 parentNode : byName(row, field),
                 orgDefaultsToWs : true,