From 1b03e1ae38a859eb92a6a9ee6894577b823b74c3 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 9 Jan 2009 15:16:21 +0000 Subject: [PATCH] allow the caller to provide a reference to the tree. use toStoreItem instead of toStoreData git-svn-id: svn://svn.open-ils.org/ILS/trunk@11783 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js b/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js index 6baf42e33a..76c86454f5 100644 --- a/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js +++ b/Open-ILS/web/js/dojo/openils/widget/FilteringTreeSelect.js @@ -30,7 +30,8 @@ if(!dojo._hasResource["openils.widget.FilteringTreeSelect"]){ this.labelAttr = '_label'; // force it this.labelType = 'html'; // force it - this._tree = dojox.jsonPath.query(window, '$.' + this.tree, {evalType:"RESULT"}); + this._tree = (typeof this.tree == 'string') ? + dojox.jsonPath.query(window, '$.' + this.tree, {evalType:"RESULT"}) : this.tree; if (!dojo.isArray(this._tree)) this._tree = [ this._tree ]; this._datalist = []; @@ -52,7 +53,7 @@ if(!dojo._hasResource["openils.widget.FilteringTreeSelect"]){ _add_items : function ( node, depth ) { var lpad = this.defaultPad * depth++; - var data = node.toStoreData(); + var data = node.toStoreItem(); data._label = '
' + node[this.searchAttr]() + '
'; this._datalist.push( data ); -- 2.11.0