override the fund labels in copy edit interface autowidgets to show the fund year...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 3 Mar 2010 20:25:43 +0000 (20:25 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 3 Mar 2010 20:25:43 +0000 (20:25 +0000)
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

index 8efb7d9..ccbc75d 100644 (file)
@@ -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'],