FIX: compiled
authorjohn@roojs.com <john@roojs.com>
Sun, 9 Dec 2018 08:37:06 +0000 (16:37 +0800)
committerjohn@roojs.com <john@roojs.com>
Sun, 9 Dec 2018 08:37:06 +0000 (16:37 +0800)
roojs-bootstrap-debug.js
roojs-bootstrap.js

index e2ec5d0..0ba605a 100644 (file)
@@ -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');
index 6bb963c..a2a96e2 100644 (file)
@@ -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<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=[];
+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&&Roo.bootstrap.version==3){C.push({tag:'button',cls:'close',html:'&times'});}C.push(B);if(this.allow_close&&Roo.bootstrap.version==4){C.push({tag:'button',cls:'close',html:'&times'});}var D='';if(this.size.length){D='modal-'+this.size;
 }var E=Roo.bootstrap.version==3?{cls:'modal-footer',cn:[{tag:'div',cls:'btn-'+this.buttonPosition}]}:{cls:'modal-footer'};var F={cls:"modal",cn:[{cls:"modal-dialog "+D,cn:[{cls:"modal-content",cn:[{cls:'modal-header',cn:C},A,E]}]}]};if(this.animate){F.cls+=' fade';
-}return F;},getChildContainer:function(){return this.bodyEl;},getButtonContainer:function(){return Roo.bootstrap.version==4?this.el.select('.modal-footer',true).first():this.el.select('.modal-footer div',true).first();},initEvents:function(){if(this.allow_close){this.closeEl.on('click',this.onClosePress,this);
-}Roo.EventManager.onWindowResize(this.resize,this,true);},onClosePress:function(){},resize:function(){this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));if(this.fitwindow){var A=Roo.lib.Dom.getViewportHeight(true);this.setSize(this.width||Roo.lib.Dom.getViewportWidth(true)-30,this.height||Roo.lib.Dom.getViewportHeight(true));
+}return F;},getChildContainer:function(){return this.bodyEl;},getButtonContainer:function(){return Roo.bootstrap.version==4?this.el.select('.modal-footer',true).first():this.el.select('.modal-footer div',true).first();},initEvents:function(){if(this.allow_close){this.closeEl.on('click',this.hide,this);
+}Roo.EventManager.onWindowResize(this.resize,this,true);},resize:function(){this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));if(this.fitwindow){this.setSize(this.width||Roo.lib.Dom.getViewportWidth(true)-30,this.height||Roo.lib.Dom.getViewportHeight(true));
 return;}if(this.max_width!==0){var w=Math.min(this.max_width,Roo.lib.Dom.getViewportWidth(true)-30);if(this.height){this.setSize(w,this.height);return;}if(this.max_height){this.setSize(w,Math.min(this.max_height,Roo.lib.Dom.getViewportHeight(true)-60));return;
 }if(!this.fit_content){this.setSize(w,Roo.lib.Dom.getViewportHeight(true)-60);return;}this.setSize(w,Math.min(60+this.headerEl.getHeight()+this.footerEl.getHeight()+this.getChildHeight(this.bodyEl.dom.childNodes),Roo.lib.Dom.getViewportHeight(true)-60));}
-},setSize:function(w,h){if(!w&&!h){return;}this.resizeTo(w,h);},show:function(){if(!this.rendered){this.render();}this.el.removeClass('hideing');this.el.dom.style.display='block';Roo.get(document.body).addClass('modal-open');if(this.animate){var A=this;(function(){this.el.addClass('show');
+},setSize:function(w,h){if(!w&&!h){return;}this.resizeTo(w,h);},show:function(){if(!this.rendered){this.render();}this.el.removeClass('hideing');this.el.dom.style.display='block';Roo.get(document.body).addClass('modal-open');if(this.animate){(function(){this.el.addClass('show');
 this.el.addClass('in');}).defer(50,this);}else{this.el.addClass('show');this.el.addClass('in');}Roo.get(document.body).addClass("x-body-masked");this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));this.maskEl.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);
 this.maskEl.dom.style.display='block';this.maskEl.addClass('show');this.resize();this.fireEvent('show',this);this.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);(function(){this.items.forEach(function(e){e.layout?e.layout():false;});}).defer(100,this);
 },hide:function(){if(this.fireEvent("beforehide",this)!==false){this.maskEl.removeClass('show');this.maskEl.dom.style.display='';Roo.get(document.body).removeClass("x-body-masked");this.el.removeClass('in');this.el.select('.modal-dialog',true).first().setStyle('transform','');