roojs-all.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 8 Mar 2011 00:05:55 +0000 (08:05 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 8 Mar 2011 00:05:55 +0000 (08:05 +0800)
roojs-all.js

index 665b34c..42c65ad 100644 (file)
@@ -967,16 +967,3 @@ this.form.reset();this.el.unmask();this.form.setValues({'username':Roo.state.Man
 Roo.XComponent.build();}},items:[{xtype:'TextField',xns:Roo.form,fieldLabel:"Email Address",name:'username',width:200,autoCreate:{tag:"input",type:"text",size:"20"}},{xtype:'TextField',xns:Roo.form,fieldLabel:"Password",inputType:'password',name:'password',width:200,autoCreate:{tag:"input",type:"text",size:"20"},listeners:{specialkey:function(e,ev){if(ev.keyCode==13){this.form.dialog.el.mask("Logging in");this.form.doAction('submit',{url:this.form.dialog.url,method:this.form.dialog.method});}}}},{xtype:'ComboBox',xns:Roo.form,fieldLabel:"Language",name:'langdisp',store:{xtype:'SimpleStore',fields:['lang','ldisp'],data:[['en','English'],['zh_HK','\u7E41\u4E2D'],['zh_CN','\u7C21\u4E2D']]},valueField:'lang',hiddenName:'lang',width:200,displayField:'ldisp',typeAhead:false,editable:false,mode:'local',triggerAction:'all',emptyText:'Select a Language...',selectOnFocus:true,listeners:{select:function(cb,A,ix){this.form.switchLang(A.data.lang);}}}]}]}],buttons:[{xtype:'Button',xns:'Roo',text:"Forgot Password",listeners:{click:function(){var n=this.form.findField('username').getValue();if(!n.length){Roo.MessageBox.alert("Error","Fill in your email address");return;}
 Roo.Ajax.request({url:this.dialog.url,params:{passwordRequest:n},method:this.dialog.method,success:function(A,B){var C=this.dialog.processResponse(A);if(!C.success){Roo.MessageBox.alert("Error",C.errorMsg?C.errorMsg:"Problem Requesting Password Reset");return;}
 Roo.MessageBox.alert("Notice","Please check you email for the Password Reset message");},failure:function(){Roo.MessageBox.alert("Error","Problem Requesting Password Reset");}});}}},{xtype:'Button',xns:'Roo',text:"Login",listeners:{click:function(){this.dialog.el.mask("Logging in");this.form.doAction('submit',{url:this.dialog.url,method:this.dialog.method});}}}]})
-Roo.XComponent=function(A){Roo.apply(this,A);this.addEvents({'built':true,'buildcomplete':true});Roo.XComponent.register(this);this.modules=[];this.el=false;}
-Roo.extend(Roo.XComponent,Roo.util.Observable{el:false,panel:false,layout:false,disabled:false,parent:false,order:false,name:false,items:false});Roo.apply(Roo.XComponent,buildCompleted:false,topModule:false,modules:[],register:function(A){this.modules.push(A);},toObject:function(A){if(typeof(A)=='object'){return A;}var ar=A.split('.');var rt,o;rt=ar.unshift();eval('if (typeof '+rt+' == "undefined"){ o = false;} o = '+rt+';');if(o===false){throw "Module not found : "+A;}
-Roo.each(ar,function(e){if(typeof(o[e])=='undefined'){throw "Module not found : "+A;}
-o=o[e];});return o;}
-preBuild:function(){var A=this.modules;this.modules=false;Roo.each(A,function(B){B.parent=this.toObject(B.parent);if(!B.parent){this.topModule=B;return;}
-B.parent=toObject(B.parent);if(!B.parent.modules){B.parent.modules=new Roo.util.MixedCollection(false,function(o){return o.order+''});}
-B.parent.modules.add(B);},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){throw "No top level modules to build";}var C=[this.topModule];var D=function(m){C.push(m);if(m.module.modules){m.module.modules.keySort('ASC',B);m.module.modules.each(D);}if(m.finalize){m.finalize.name=m.name+" (clean up) ";C.push(m.finalize);}}
-this.topModule.modules.keySort('ASC',B);this.topModule.modules.each(D);}
-build:function(){this.preBuild();var A=this.buildOrder();if(!A.length){throw "NO modules!!!";}
-Roo.MessageBox.show({title:'loading'});Roo.MessageBox.show({title:"Please wait...",msg:"Building Interface...",width:450,progress:true,closable:false,modal:false});var B=A.length();var C=this;var D=function(){if(A.length){Roo.MessageBox.hide();C.topModule.fireEvent('buildcomplete',C.topModule);return;}var m=A.unshift();if(typeof(m)=='function'){m.call(this);return D.defer(10,C);}Roo.MessageBox.updateProgress((B-A.length)/B,"Building Interface "+(B-A.length)+" of "+B+(m.name?(' - '+m.name):''));var E=(typeof(m.module.disabled)=='function')?m.module.disabled.call(m.module.disabled):m.module.disabled;};if(disabled){return D();}
-m.el=m.parent.el.addxtype(m.items[0]);m.fireEvent('built',m);m.panel=this.el;m.layout=m.panel.layout;}
-progressRun.defer(1,_this);}});