From e67db8f76a8a9e75410d6c3ce10824f0e00ede11 Mon Sep 17 00:00:00 2001 From: "john@roojs.com" Date: Sun, 9 Dec 2018 16:37:06 +0800 Subject: [PATCH] FIX: compiled --- roojs-bootstrap-debug.js | 15 +++++---------- roojs-bootstrap.js | 8 ++++---- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index e2ec5d0738..0ba605a47d 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2817,7 +2817,7 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { if(this.specificTitle){ title = this.title; - }; + } var header = []; if (this.allow_close && Roo.bootstrap.version == 3) { @@ -2909,17 +2909,13 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { initEvents : function() { if (this.allow_close) { - this.closeEl.on('click', this.onClosePress, this); + this.closeEl.on('click', this.hide, this); } Roo.EventManager.onWindowResize(this.resize, this, true); }, - - onClosePress : function() - { - - }, + resize : function() { @@ -2930,8 +2926,7 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { if (this.fitwindow) { - var view_height = Roo.lib.Dom.getViewportHeight(true); - + this.setSize( this.width || Roo.lib.Dom.getViewportWidth(true) - 30, this.height || Roo.lib.Dom.getViewportHeight(true) // catering margin-top 30 margin-bottom 30 @@ -2995,7 +2990,7 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { Roo.get(document.body).addClass('modal-open'); if(this.animate){ // element has 'fade' - so stuff happens after .3s ?- not sure why the delay? - var _this = this; + (function(){ this.el.addClass('show'); this.el.addClass('in'); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 6bb963cfb8..a2a96e2285 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -113,14 +113,14 @@ if(!this.el){var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.cls) }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);if(this.buttons.length){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.getButtonContainer());},this);}var C=[];if(typeof(this.items)!='undefined'){var D=this.items;delete this.items;for(var i=0; -i