From: john Date: Tue, 2 Oct 2018 05:07:50 +0000 (+0800) Subject: sync X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=bde7bb01ea333e6853bf5e1005a134f5fefe21f7 sync --- diff --git a/Roo/bootstrap/Modal.js b/Roo/bootstrap/Modal.js index 0c2816a0ca..9a526faee4 100644 --- a/Roo/bootstrap/Modal.js +++ b/Roo/bootstrap/Modal.js @@ -278,11 +278,22 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { var w = Math.min(this.max_width, Roo.lib.Dom.getViewportWidth(true) - 30); - if(this.height) { + if( + this.height && + this.height <= Roo.lib.Dom.getViewportHeight(true) - 60 + ) { this.setSize(w, this.height); return; } + if( + this.height && + this.height > Roo.lib.Dom.getViewportHeight(true) - 60 + ) { + this.setSize(w, Roo.lib.Dom.getViewportHeight(true) - 60); + return; + } + if(!this.fit_content) { this.setSize(w, Roo.lib.Dom.getViewportHeight(true) - 60); return; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index b8c816b811..70aaa9c661 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2839,11 +2839,22 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { var w = Math.min(this.max_width, Roo.lib.Dom.getViewportWidth(true) - 30); - if(this.height) { + if( + this.height && + this.height <= Roo.lib.Dom.getViewportHeight(true) - 60 + ) { this.setSize(w, this.height); return; } + if( + this.height && + this.height > Roo.lib.Dom.getViewportHeight(true) - 60 + ) { + this.setSize(w, Roo.lib.Dom.getViewportHeight(true) - 60); + return; + } + if(!this.fit_content) { this.setSize(w, Roo.lib.Dom.getViewportHeight(true) - 60); return; diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 6dcc698ac5..8c2b7c07d8 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -112,17 +112,18 @@ for(var i=0;iRoo.lib.Dom.getViewportHeight(true)-60){this.setSize(w,Roo.lib.Dom.getViewportHeight(true)-60); +return;}if(!this.fit_content){this.setSize(w,Roo.lib.Dom.getViewportHeight(true)-60);return;}var A=this.bodyEl.dom.childNodes;var B=60+this.headerEl.getHeight()+this.footerEl.getHeight();for(var i=0;i