roojs-bootstrap.js
authorEdward <edward@roojs.com>
Fri, 21 Mar 2014 13:07:11 +0000 (21:07 +0800)
committerEdward <edward@roojs.com>
Fri, 21 Mar 2014 13:07:11 +0000 (21:07 +0800)
roojs-bootstrap-debug.js

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

index 79b29da..e28d1a0 100644 (file)
@@ -210,7 +210,7 @@ Roo.extend(Roo.bootstrap.Body, Roo.bootstrap.Component,  {
         cls: 'container'
     },
     onRender : function(ct, position){
-        Roo.log('run');
+        
         
         //this.el.addClass([this.fieldClass, this.cls]);
         
@@ -1110,6 +1110,7 @@ Roo.extend(Roo.bootstrap.MenuSeparator, Roo.bootstrap.Component,  {
 
 Roo.bootstrap.Modal = function(config){
     Roo.bootstrap.Modal.superclass.constructor.call(this, config);
+    this.el = Roo.get(document.body);
     this.addEvents({
         // raw events
         /**
index 2988990..0f8e02e 100644 (file)
@@ -4,7 +4,7 @@ this.el=ct.createChild(B,A);if(this.tabIndex!==undefined){this.el.dom.setAttribu
 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;var C=!Roo.select('body').first().attr('xtype');if(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var D=Roo.get(this[B]());var E=D?D.child('>*[xtype]'):false;if(E&&E.attr('xtype').split('.').pop()==cn.xtype){cn.el=E;}else {Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));}}var F=typeof(A['flexy:if']!='undefined')||typeof(A['flexy:foreach']!='undefined');if(!C&&F&&!cn.el&&cn.can_build_overlaid){Roo.log('skipping render');}else {cn.render(this[B]());}}var G=[];if(typeof(A.menu)!='undefined'){A.menu.parentType=cn.xtype;A.menu.triggerEl=cn.el;G.push(cn.addxtype(Roo.apply({},A.menu)));}if(!A.items||!A.items.length){cn.items=G;return cn;}var H=A.items;delete A.items;for(var i=0;i<H.length;i++){G.push(cn.addxtype(Roo.apply({},H[i])));}
 cn.items=G;return cn;}});
 //Roo/bootstrap/Body.js
-Roo.bootstrap.Body=function(A){Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(document.body);};Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{autoCreate:{cls:'container'},onRender:function(ct,A){Roo.log('run');}});
+Roo.bootstrap.Body=function(A){Roo.bootstrap.Body.superclass.constructor.call(this,A);this.el=Roo.get(document.body);};Roo.extend(Roo.bootstrap.Body,Roo.bootstrap.Component,{autoCreate:{cls:'container'},onRender:function(ct,A){}});
 //Roo/bootstrap/ButtonGroup.js
 Roo.bootstrap.ButtonGroup=function(A){Roo.bootstrap.ButtonGroup.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.ButtonGroup,Roo.bootstrap.Component,{size:'',align:'',direction:'',toolbar:false,btn:true,getAutoCreate:function(){var A={cls:'btn-group',html:null}
 A.html=this.html||A.html;if(this.toolbar){A={cls:'btn-toolbar',html:null};return A;}if(['vertical','justified'].indexOf(this.align)!==-1){A.cls='btn-group-'+this.align;if(this.align=='justified'){console.log(this.items);}}if(['lg','sm','xs'].indexOf(this.size)!==-1){A.cls+=' btn-group-'+this.size;}if(this.direction=='up'){A.cls+=' dropup';}return A;}});
@@ -31,7 +31,7 @@ Roo.bootstrap.MenuItem=function(A){Roo.bootstrap.MenuItem.superclass.constructor
 //Roo/bootstrap/MenuSeparator.js
 Roo.bootstrap.MenuSeparator=function(A){Roo.bootstrap.MenuSeparator.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MenuSeparator,Roo.bootstrap.Component,{getAutoCreate:function(){var A={cls:'divider',tag:'li'};return A;}});
 //Roo/bootstrap/Modal.js
-Roo.bootstrap.Modal=function(A){Roo.bootstrap.Modal.superclass.constructor.call(this,A);this.addEvents({"btnclick":true});};Roo.extend(Roo.bootstrap.Modal,Roo.bootstrap.Component,{title:'test dialog',buttons:false,onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(!this.el){var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.cls){B.cls+=' '+this.cls;}if(this.style){B.style=this.style;}
+Roo.bootstrap.Modal=function(A){Roo.bootstrap.Modal.superclass.constructor.call(this,A);this.el=Roo.get(document.body);this.addEvents({"btnclick":true});};Roo.extend(Roo.bootstrap.Modal,Roo.bootstrap.Component,{title:'test dialog',buttons:false,onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(!this.el){var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.cls){B.cls+=' '+this.cls;}if(this.style){B.style=this.style;}
 this.el=Roo.get(document.body).createChild(B,A);}if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}
 this.maskEl=Roo.DomHelper.append(document.body,{tag:"div",cls:"x-dlg-mask"},true);this.maskEl.enableDisplayMode("block");this.maskEl.hide();if(this.buttons){Roo.each(this.buttons,function(bb){b=Roo.apply({},bb);b.xns=b.xns||Roo.bootstrap;b.xtype=b.xtype||'Button';if(typeof(b.listeners)=='undefined'){b.listeners={click:this.onButtonClick.createDelegate(this)};}var C=Roo.factory(b);C.onRender(this.el.select('.modal-footer').first());},this);}
 this.initEvents();},getAutoCreate:function(){var A={cls:'modal-body',html:this.html||''};return {cls:"modal fade",cn:[{cls:"modal-dialog",cn:[{cls:"modal-content",cn:[{cls:'modal-header',cn:[{tag:'button',cls:'close',html:'&times'},{tag:'h4',cls:'modal-title',html:this.title}]},A,{cls:'modal-footer'}]}]}]};},getChildContainer:function(){Roo.log(this);return this.el.select('.modal-body',true).first();},getButtonContainer:function(){return this.el.select('.modal-footer',true).first();},initEvents:function(){this.el.select('.modal-header .close').on('click',this.hide,this);},show:function(){if(!this.rendered){this.render();}