From 7cca1fdb5ca18be5f1bd1320af4cc66cac9a82ae Mon Sep 17 00:00:00 2001 From: Remington Steed Date: Thu, 29 Sep 2016 11:05:18 -0400 Subject: [PATCH] LP#802700 Sort funds by code and year This commit applies Bill Erickson's change from bug #1227344 to the fund selector that appears on the Selection List (picklist) screen when you click "Copies" to reveal the line items table. (Bill also mentioned this in bug #1266471.) Signed-off-by: Remington Steed Signed-off-by: Chris Sharp Signed-off-by: Dan Wells --- Open-ILS/web/js/ui/default/acq/common/li_table.js | 2 ++ 1 file changed, 2 insertions(+) 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 1f0211005e..c54346bc6c 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 @@ -30,6 +30,7 @@ var fundLabelFormat = [ ]; var fundSearchFormat = ['${0} (${1})', 'code', 'year']; var fundSearchFilter = {active : 't'}; +var fundSort = {order_by : {"acqf":"year DESC, code"}}; function nodeByName(name, context) { return dojo.query('[name='+name+']', context)[0]; @@ -183,6 +184,7 @@ function AcqLiTable() { "labelFormat": (field == 'fund') ? fundLabelFormat : null, "searchFormat": (field == 'fund') ? fundSearchFormat : null, "searchFilter": (field == 'fund') ? fundSearchFilter : null, + "searchOptions": (field == 'fund') ? fundSort : null, "orgLimitPerms": (field == 'location') ? ['CREATE_PICKLIST', 'CREATE_PURCHASE_ORDER'] : [perms], "dijitArgs": { "required": false, -- 2.11.0