~cdparra/gelee/trunk

« back to all changes in this revision

Viewing changes to webui/ecosystem/extjs/build/widgets/tree/AsyncTreeNode-min.js

  • Committer: parra
  • Date: 2010-03-15 02:39:02 UTC
  • Revision ID: svn-v4:ac5bba68-f036-4e09-846e-8f32731cc928:trunk/gelee:1433
merged gelee at svn

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Ext JS Library 3.0 RC2
 
3
 * Copyright(c) 2006-2009, Ext JS, LLC.
 
4
 * licensing@extjs.com
 
5
 * 
 
6
 * http://extjs.com/license
 
7
 */
 
8
 
 
9
 
 
10
Ext.tree.AsyncTreeNode=function(config){this.loaded=config&&config.loaded===true;this.loading=false;Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments);this.addEvents('beforeload','load');};Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(deep,anim,callback,scope){if(this.loading){var timer;var f=function(){if(!this.loading){clearInterval(timer);this.expand(deep,anim,callback,scope);}}.createDelegate(this);timer=setInterval(f,200);return;}
 
11
if(!this.loaded){if(this.fireEvent("beforeload",this)===false){return;}
 
12
this.loading=true;this.ui.beforeLoad(this);var loader=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(loader){loader.load(this,this.loadComplete.createDelegate(this,[deep,anim,callback,scope]),this);return;}}
 
13
Ext.tree.AsyncTreeNode.superclass.expand.call(this,deep,anim,callback,scope);},isLoading:function(){return this.loading;},loadComplete:function(deep,anim,callback,scope){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(deep,anim,callback,scope);},isLoaded:function(){return this.loaded;},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded){return true;}else{return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this);}},reload:function(callback,scope){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild).destroy();}
 
14
this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false;}
 
15
this.expand(false,false,callback,scope);}});Ext.tree.TreePanel.nodeTypes.async=Ext.tree.AsyncTreeNode;
 
 
b'\\ No newline at end of file'