X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=lib%2Fdijit%2Ftree%2FTreeStoreModel.js;h=bba7dc74c863e235dcfbfb955b6b460df18fab09;hb=f0cfe83e3725f9a3928da97a6e3085e79cb25309;hp=f61977c2fd85e28a29b8ac4481a634e18f67874f;hpb=9a2885da170ffd64358b99194095851a2d09c1b6;p=tt-rss.git diff --git a/lib/dijit/tree/TreeStoreModel.js b/lib/dijit/tree/TreeStoreModel.js index f61977c2..bba7dc74 100644 --- a/lib/dijit/tree/TreeStoreModel.js +++ b/lib/dijit/tree/TreeStoreModel.js @@ -1,2 +1,2 @@ //>>built -define("dijit/tree/TreeStoreModel",["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/json","dojo/_base/lang"],function(_1,_2,_3,_4,_5){return _3("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(_6){_5.mixin(this,_6);this.connects=[];var _7=this.store;if(!_7.getFeatures()["dojo.data.api.Identity"]){throw new Error("dijit.Tree: store must support dojo.data.Identity");}if(_7.getFeatures()["dojo.data.api.Notification"]){this.connects=this.connects.concat([_2.after(_7,"onNew",_5.hitch(this,"onNewItem"),true),_2.after(_7,"onDelete",_5.hitch(this,"onDeleteItem"),true),_2.after(_7,"onSet",_5.hitch(this,"onSetItem"),true)]);}},destroy:function(){var h;while(h=this.connects.pop()){h.remove();}},getRoot:function(_8,_9){if(this.root){_8(this.root);}else{this.store.fetch({query:this.query,onComplete:_5.hitch(this,function(_a){if(_a.length!=1){throw new Error(this.declaredClass+": query "+_4.stringify(this.query)+" returned "+_a.length+" items, but must return exactly one item");}this.root=_a[0];_8(this.root);}),onError:_9});}},mayHaveChildren:function(_b){return _1.some(this.childrenAttrs,function(_c){return this.store.hasAttribute(_b,_c);},this);},getChildren:function(_d,_e,_f){var _10=this.store;if(!_10.isItemLoaded(_d)){var _11=_5.hitch(this,arguments.callee);_10.loadItem({item:_d,onItem:function(_12){_11(_12,_e,_f);},onError:_f});return;}var _13=[];for(var i=0;i