roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Fri, 7 Feb 2014 06:27:39 +0000 (14:27 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 7 Feb 2014 06:27:39 +0000 (14:27 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index df08ec5..92f87b1 100644 (file)
@@ -53,7 +53,7 @@ Roo.extend(Roo.bootstrap.Component, Roo.BoxComponent,  {
         Roo.bootstrap.Component.superclass.onRender.call(this, ct, position);
         if(this.el){
             
-            if (this.attr('xtype')) {
+            if (this.el.attr('xtype')) {
                 this.el.dom.removeAttribute('xtype');
                 this.initEvents();
             }
index fe63ea6..36bd004 100644 (file)
@@ -1,5 +1,5 @@
 //Roo/bootstrap/Component.js
-Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstrap.Component.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Component,Roo.BoxComponent,{cls:false,style:false,autoCreate:false,initEvents:function(){},xattr:false,parentId:false,parent:function(){return Roo.ComponentMgr.get(this.parentId)},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(this.el){if(this.attr('xtype')){this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.xattr&&typeof(this.xattr)=='object'){for(var i in this.xattr){B[i]=this.xattr[i];}}if(this.cls){B.cls+=' '+this.cls;}if(this.style){B.style=this.style;}
+Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstrap.Component.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Component,Roo.BoxComponent,{cls:false,style:false,autoCreate:false,initEvents:function(){},xattr:false,parentId:false,parent:function(){return Roo.ComponentMgr.get(this.parentId)},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(this.el){if(this.el.attr('xtype')){this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.xattr&&typeof(this.xattr)=='object'){for(var i in this.xattr){B[i]=this.xattr[i];}}if(this.cls){B.cls+=' '+this.cls;}if(this.style){B.style=this.style;}
 this.el=ct.createChild(B,A);if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}
 this.initEvents();},getChildContainer:function(){return this.el;},addxtype:function(A,B){var cn=this;B=typeof(B=='undefined')?'getChildContainer':B;if(A.xtype!='Body'){cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;if(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var C=Roo.get(this[B]()).child('*[xtype]');if(C){cn.el=C;}}
 cn.render(this[B]());}var D=[];if(typeof(A.menu)!='undefined'){A.menu.parentType=cn.xtype;A.menu.triggerEl=cn.el;D.push(cn.addxtype(Roo.apply({},A.menu)));}if(typeof(A.buttons)!='undefined'&&typeof(cn.getButtonContainer)=='function'){for(var i=0;i<A.buttons.length;i++){D.push(cn.addxtype(Roo.apply({},A.buttons[i]),'getButtonContainer'));}}if(!A.items||!A.items.length){this.items=D;return this;}var E=A.items;delete A.items;for(var i=0;i<E.length;i++){D.push(cn.addxtype(Roo.apply({},E[i])));}