roojs-bootstrap.js
authorjohn <john@roojs.com>
Wed, 2 May 2018 05:48:02 +0000 (13:48 +0800)
committerjohn <john@roojs.com>
Wed, 2 May 2018 05:48:02 +0000 (13:48 +0800)
roojs-bootstrap-debug.js

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

index a6bee71..e9c1b22 100644 (file)
@@ -2611,6 +2611,7 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component,  {
         //this.el.addClass("x-dlg-modal");
 
         if (this.buttons.length) {
+            Roo.log(this.buttons);
             Roo.each(this.buttons, function(bb) {
                 var b = Roo.apply({}, bb);
                 b.xns = b.xns || Roo.bootstrap;
index b4be479..65d22ec 100644 (file)
@@ -103,7 +103,7 @@ Roo.bootstrap.MenuSeparator=function(A){Roo.bootstrap.MenuSeparator.superclass.c
 Roo.bootstrap.Modal=function(A){Roo.bootstrap.Modal.superclass.constructor.call(this,A);this.addEvents({"btnclick":true,"resize":true});this.buttons=this.buttons||[];if(this.tmpl){this.tmpl=Roo.factory(this.tmpl);}};Roo.extend(Roo.bootstrap.Modal,Roo.bootstrap.Component,{title:'test dialog',buttons:false,html:false,tmp:false,specificTitle:false,buttonPosition:'right',allow_close:true,animate:true,fitwindow:false,dialogEl:false,bodyEl:false,footerEl:false,titleEl:false,closeEl:false,size:'',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.dialogEl=this.el.select('.modal-dialog',true).first();this.bodyEl=this.el.select('.modal-body',true).first();this.closeEl=this.el.select('.modal-header .close',true).first();this.headerEl=this.el.select('.modal-header',true).first();this.titleEl=this.el.select('.modal-title',true).first();
-this.footerEl=this.el.select('.modal-footer',true).first();this.maskEl=Roo.DomHelper.append(document.body,{tag:"div",cls:"x-dlg-mask"},true);this.maskEl.enableDisplayMode("block");this.maskEl.hide();if(this.buttons.length){Roo.each(this.buttons,function(bb){var b=Roo.apply({}
+this.footerEl=this.el.select('.modal-footer',true).first();this.maskEl=Roo.DomHelper.append(document.body,{tag:"div",cls:"x-dlg-mask"},true);this.maskEl.enableDisplayMode("block");this.maskEl.hide();if(this.buttons.length){Roo.log(this.buttons);Roo.each(this.buttons,function(bb){var 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 E=Roo.factory(b);E.render(this.el.select('.modal-footer div').first());},this);}var C=[];if(typeof(this.items)!='undefined'){var D=this.items;
 delete this.items;for(var i=0;i<D.length;i++){C.push(this.addxtype(Roo.apply({},D[i])));}}this.items=C;this.initEvents();},getAutoCreate:function(){var A={cls:'modal-body',html:this.html||''};var B={tag:'h4',cls:'modal-title',html:this.title};if(this.specificTitle){B=this.title;
 };var C=[];if(this.allow_close){C.push({tag:'button',cls:'close',html:'&times'});}C.push(B);var D='';if(this.size.length){D='modal-'+this.size;}var E={cls:"modal",style:'display: none',cn:[{cls:"modal-dialog "+D,cn:[{cls:"modal-content",cn:[{cls:'modal-header',cn:C}