From: Edward Date: Thu, 7 Mar 2019 04:15:11 +0000 (+0800) Subject: roojs-ui.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=cc10617dd5e2856f01d2462d1562ec59aaae9331 roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- diff --git a/roojs-all.js b/roojs-all.js index 5abb530ea8..405974eaae 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1580,7 +1580,8 @@ Roo.menu.DateMenu=function(A){Roo.menu.DateMenu.superclass.constructor.call(this // Roo/menu/ColorMenu.js Roo.menu.ColorMenu=function(A){Roo.menu.ColorMenu.superclass.constructor.call(this,A);this.plain=true;var ci=new Roo.menu.ColorItem(A);this.add(ci);this.palette=ci.palette;this.relayEvents(ci,["select"]);};Roo.extend(Roo.menu.ColorMenu,Roo.menu.Menu); // Roo/form/TextItem.js -Roo.form.TextItem=function(A){Roo.form.TextItem.superclass.constructor.call(this,A);};Roo.extend(Roo.form.TextItem,Roo.BoxComponent,{tag:'div',html:'',getAutoCreate:function(){var A={id:this.id,tag:this.tag,html:this.html};return A;}}); +Roo.form.TextItem=function(A){Roo.form.TextItem.superclass.constructor.call(this,A);};Roo.extend(Roo.form.TextItem,Roo.BoxComponent,{tag:'div',html:'',getAutoCreate:function(){var A={id:this.id,tag:this.tag,html:this.html};return A;},onRender:function(ct,A){Roo.form.TextItem.superclass.onRender.call(this,ct,A); +if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=typeof(this.name)=='undefined'?this.id:this.name;}if(!B.name.length){delete B.name;}this.el=ct.createChild(B,A);}}}); // Roo/form/Field.js Roo.form.Field=function(A){Roo.form.Field.superclass.constructor.call(this,A);};Roo.extend(Roo.form.Field,Roo.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"new-password"} ,fieldClass:"x-form-field",msgTarget:'qtip',msgFx:'normal',readOnly:false,disabled:false,inputType:undefined,tabIndex:undefined,isFormField:true,hasFocus:false,value:undefined,loadedValue:false,initComponent:function(){Roo.form.Field.superclass.initComponent.call(this); diff --git a/roojs-debug.js b/roojs-debug.js index 844d489eec..e6650760d3 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -38740,6 +38740,22 @@ Roo.extend(Roo.form.TextItem, Roo.BoxComponent, { return cfg; + }, + + onRender : function(ct, position) + { + Roo.form.TextItem.superclass.onRender.call(this, ct, position); + + if(!this.el){ + var cfg = this.getAutoCreate(); + if(!cfg.name){ + cfg.name = typeof(this.name) == 'undefined' ? this.id : this.name; + } + if (!cfg.name.length) { + delete cfg.name; + } + this.el = ct.createChild(cfg, position); + } } });/* diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 9c24216439..c7ed298cec 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -16289,6 +16289,22 @@ Roo.extend(Roo.form.TextItem, Roo.BoxComponent, { return cfg; + }, + + onRender : function(ct, position) + { + Roo.form.TextItem.superclass.onRender.call(this, ct, position); + + if(!this.el){ + var cfg = this.getAutoCreate(); + if(!cfg.name){ + cfg.name = typeof(this.name) == 'undefined' ? this.id : this.name; + } + if (!cfg.name.length) { + delete cfg.name; + } + this.el = ct.createChild(cfg, position); + } } });/* diff --git a/roojs-ui.js b/roojs-ui.js index de173378e6..fd78729698 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -711,7 +711,8 @@ Roo.menu.DateMenu=function(A){Roo.menu.DateMenu.superclass.constructor.call(this // Roo/menu/ColorMenu.js Roo.menu.ColorMenu=function(A){Roo.menu.ColorMenu.superclass.constructor.call(this,A);this.plain=true;var ci=new Roo.menu.ColorItem(A);this.add(ci);this.palette=ci.palette;this.relayEvents(ci,["select"]);};Roo.extend(Roo.menu.ColorMenu,Roo.menu.Menu); // Roo/form/TextItem.js -Roo.form.TextItem=function(A){Roo.form.TextItem.superclass.constructor.call(this,A);};Roo.extend(Roo.form.TextItem,Roo.BoxComponent,{tag:'div',html:'',getAutoCreate:function(){var A={id:this.id,tag:this.tag,html:this.html};return A;}}); +Roo.form.TextItem=function(A){Roo.form.TextItem.superclass.constructor.call(this,A);};Roo.extend(Roo.form.TextItem,Roo.BoxComponent,{tag:'div',html:'',getAutoCreate:function(){var A={id:this.id,tag:this.tag,html:this.html};return A;},onRender:function(ct,A){Roo.form.TextItem.superclass.onRender.call(this,ct,A); +if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=typeof(this.name)=='undefined'?this.id:this.name;}if(!B.name.length){delete B.name;}this.el=ct.createChild(B,A);}}}); // Roo/form/Field.js Roo.form.Field=function(A){Roo.form.Field.superclass.constructor.call(this,A);};Roo.extend(Roo.form.Field,Roo.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"new-password"} ,fieldClass:"x-form-field",msgTarget:'qtip',msgFx:'normal',readOnly:false,disabled:false,inputType:undefined,tabIndex:undefined,isFormField:true,hasFocus:false,value:undefined,loadedValue:false,initComponent:function(){Roo.form.Field.superclass.initComponent.call(this);