From 7dc061356a179f669a03aecafcbf32e4f67eb416 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 14 Jan 2009 17:21:40 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@11826 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js b/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js index 76c86454f5..f71dc43a35 100644 --- a/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js +++ b/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js @@ -35,7 +35,8 @@ if(!dojo._hasResource["openils.widget.FilteringTreeSelect"]){ 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 @@ if(!dojo._hasResource["openils.widget.FilteringTreeSelect"]){ this.store = new dojo.data.ItemFileReadStore({ data : { identifier : this.valueField, + label : this.labelAttr, items : this._datalist } }); -- 2.11.0