From 0b0ea114562f3eaa8ae1f7f53218d8d10f2116e0 Mon Sep 17 00:00:00 2001
From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Wed, 3 Mar 2010 20:25:43 +0000
Subject: [PATCH] override the fund labels in copy edit interface autowidgets
 to show the fund year in addition to fund code

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15683 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/web/js/ui/default/acq/common/li_table.js | 4 ++++
 1 file changed, 4 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 8efb7d9c2c..ccbc75dbe9 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
@@ -22,6 +22,8 @@ var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
 const XUL_OPAC_WRAPPER = 'chrome://open_ils_staff_client/content/cat/opac.xul';
 var li_exportable_attrs = ["issn", "isbn", "upc"];
 
+var fundLabelFormat = ['${0} (${1})', 'code', 'year'];
+
 function nodeByName(name, context) {
     return dojo.query('[name='+name+']', context)[0];
 }
@@ -1049,6 +1051,7 @@ function AcqLiTable() {
                     var widget = new openils.widget.AutoFieldWidget({
                         fmField : field,
                         fmClass : 'acqlid',
+                        labelFormat : (field == 'fund') ? fundLabelFormat : null,
                         parentNode : dojo.query('[name='+field+']', row)[0],
                         orgLimitPerms : ['CREATE_PICKLIST'],
                         dijitArgs : {required:false},
@@ -1144,6 +1147,7 @@ function AcqLiTable() {
                 var widget = new openils.widget.AutoFieldWidget({
                     fmObject : copy,
                     fmField : field,
+                    labelFormat : (field == 'fund') ? fundLabelFormat : null,
                     fmClass : 'acqlid',
                     parentNode : dojo.query('[name='+field+']', row)[0],
                     orgLimitPerms : ['CREATE_PICKLIST', 'CREATE_PURCHASE_ORDER'],
-- 
2.11.0