[open-ils-commits] r11826 - trunk/Open-ILS/web/js/dojo/openils/widget
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jan 14 12:21:42 EST 2009
Author: miker
Date: 2009-01-14 12:21:40 -0500 (Wed, 14 Jan 2009)
New Revision: 11826
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js
Log:
default searchAttr to valueField (assumes a markup-based implementation ...); add an explicit label setting to the data store for early display, otherwise it uses identifier
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js 2009-01-14 17:15:44 UTC (rev 11825)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js 2009-01-14 17:21:40 UTC (rev 11826)
@@ -35,7 +35,8 @@
if (!dojo.isArray(this._tree)) this._tree = [ this._tree ];
this._datalist = [];
- if (!this.valueField) this.valueField = this._tree.Identifier;
+ if (!this.valueField) this.valueField = this._tree[0].Identifier;
+ if (!this.searchAttr) this.searchAttr = this.valueField;
var self = this;
this._tree.forEach( function (node) { self._add_items( node, 0 ); } );
@@ -43,6 +44,7 @@
this.store = new dojo.data.ItemFileReadStore({
data : {
identifier : this.valueField,
+ label : this.labelAttr,
items : this._datalist
}
});
More information about the open-ils-commits
mailing list