roojs-core.js
authorEdward <edward@roojs.com>
Fri, 21 Mar 2014 12:07:27 +0000 (20:07 +0800)
committerEdward <edward@roojs.com>
Fri, 21 Mar 2014 12:07:27 +0000 (20:07 +0800)
roojs-core-debug.js

roojs-core-debug.js
roojs-core.js

index b466e16..e34253b 100644 (file)
@@ -16197,7 +16197,8 @@ Roo.apply(Roo.XComponent, {
             
             var m = mods.shift();
             
-            
+            Roo.log('m');
+            Roo.log(m);
             Roo.debug && Roo.log(m);
             // not sure if this is supported any more.. - modules that are are just function
             if (typeof(m) == 'function') { 
@@ -16214,20 +16215,21 @@ Roo.apply(Roo.XComponent, {
                 Roo.MessageBox.updateProgress(  (total  - mods.length)/total, msg  );
             }
             
+            Roo.log('msg');
+            Roo.log(msg);
          
             // is the module disabled?
             var disabled = (typeof(m.disabled) == 'function') ?
                 m.disabled.call(m.module.disabled) : m.disabled;    
             
-            
+            Roo.log('disabled');
+            Roo.log(disabled);
             if (disabled) {
                 return progressRun(); // we do not update the display!
             }
             
             // now build 
             
-               Roo.log('m');
-                Roo.log(m)
                        
             m.render();
             // it's 10 on top level, and 1 on others??? why...
index 4b51829..f335a43 100644 (file)
@@ -327,7 +327,7 @@ this.modules.push(A);},toObject:function(str){if(!str||typeof(str)=='object'){re
 Roo.each(ar,function(e){if(typeof(o[e])=='undefined'){throw "Module not found : "+str;}
 o=o[e];});return o;},preBuild:function(){var _t=this;Roo.each(this.modules,function(A){Roo.XComponent.event.fireEvent('beforebuild',A);var B=A.parent;try{A.parent=this.toObject(B);}catch(e){Roo.log("parent:toObject failed: "+e.toString());return;}if(!A.parent){Roo.debug&&Roo.log("GOT top level module");Roo.debug&&Roo.log(A);A.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''});this.topModule=A;return;}if(typeof(A.parent)=='string'){this.elmodules.push(A);return;}if(A.parent.constructor!=Roo.XComponent){Roo.log("Warning : Object Parent is not instance of XComponent:"+A.name)}if(!A.parent.modules){A.parent.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''});}if(A.parent.disabled){A.disabled=true;}
 A.parent.modules.add(A);},this);},buildOrder:function(){var A=this;var B=function(a,b){return String(a).toUpperCase()>String(b).toUpperCase()?1:-1;};if((!this.topModule||!this.topModule.modules)&&!this.elmodules.length){throw "No top level modules to build";}var C=this.topModule?[this.topModule]:[];Roo.each(this.elmodules,function(e){C.push(e);if(!this.topModule&&typeof(e.parent)=='string'&&e.parent.substring(0,1)=='#'&&Roo.get(e.parent.substr(1))){A.topModule=e;}});var D=function(m){Roo.debug&&Roo.log("build Order: add: "+m.name);C.push(m);if(m.modules&&!m.disabled){Roo.debug&&Roo.log("build Order: "+m.modules.length+" child modules");m.modules.keySort('ASC',B);Roo.debug&&Roo.log("build Order: "+m.modules.length+" child modules (after sort)");m.modules.each(D);}else {Roo.debug&&Roo.log("build Order: no child modules");}if(m.finalize){m.finalize.name=m.name+" (clean up) ";C.push(m.finalize);}};if(this.topModule&&this.topModule.modules){this.topModule.modules.keySort('ASC',B);this.topModule.modules.each(D);}return C;},build:function(){this.preBuild();var A=this.buildOrder();if(!A.length){throw "NO modules!!!";}var B="Building Interface...";if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.show({title:'loading'});Roo.MessageBox.show({title:"Please wait...",msg:B,width:450,progress:true,closable:false,modal:false});}var C=A.length;var D=this;var E=function(){if(!A.length){Roo.debug&&Roo.log('hide?');if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.hide();}
-Roo.XComponent.event.fireEvent('buildcomplete',D.topModule);return false;}var m=A.shift();Roo.debug&&Roo.log(m);if(typeof(m)=='function'){m.call(this);return E.defer(10,D);}B="Building Interface "+(C-A.length)+" of "+C+(m.name?(' - '+m.name):'');Roo.debug&&Roo.log(B);if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.updateProgress((C-A.length)/C,B);}var F=(typeof(m.disabled)=='function')?m.disabled.call(m.module.disabled):m.disabled;if(F){return E();}
-Roo.log('m');Roo.log(m)
+Roo.XComponent.event.fireEvent('buildcomplete',D.topModule);return false;}var m=A.shift();Roo.log('m');Roo.log(m);Roo.debug&&Roo.log(m);if(typeof(m)=='function'){m.call(this);return E.defer(10,D);}B="Building Interface "+(C-A.length)+" of "+C+(m.name?(' - '+m.name):'');Roo.debug&&Roo.log(B);if(!this.hideProgress&&Roo.MessageBox){Roo.MessageBox.updateProgress((C-A.length)/C,B);}
+Roo.log('msg');Roo.log(B);var F=(typeof(m.disabled)=='function')?m.disabled.call(m.module.disabled):m.disabled;Roo.log('disabled');Roo.log(F);if(F){return E();}
 m.render();return E.defer(10,D);}
 E.defer(1,D);},event:false,on:false});Roo.XComponent.event=new Roo.util.Observable({events:{'register':true,'beforebuild':true,'buildcomplete':true}});Roo.XComponent.on=Roo.XComponent.event.on.createDelegate(Roo.XComponent.event);