From: john Date: Wed, 26 Sep 2018 03:47:15 +0000 (+0800) Subject: roojs-bootstrap.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=7da13dbccbf14e6cd14f00ac4645afe1c3d02227;p=roojs1 roojs-bootstrap.js roojs-bootstrap-debug.js --- diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 023853b9bc..6f3760ef39 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2833,35 +2833,18 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { var w = Math.min(this.max_width, Roo.lib.Dom.getViewportWidth(true) - 30); - Roo.log(this.height); - if(this.height) { - this.setSize(w, this.height || Roo.lib.Dom.getViewportHeight(true) - 60); + this.setSize(w, this.height); return; } - var view_height = Roo.lib.Dom.getViewportHeight(true) - 60; - var body_childs = this.bodyEl.dom.childNodes; - var body_height = 0; + var full_height = this.headerEl.getHeight() + this.footerEl.getHeight(); for(var i = 0; i < body_childs.length; i++) { - body_height += body_childs[i].offsetHeight; + full_height += body_childs[i].offsetHeight; } - // this.setSize(w, this.height || view_height); - - - - // - // if( - // ( - // this.headerEl.getHeight() + - // this.bodyEl.getHeight() + - // this.footerEl.getHeight() - // ) > view_height) { - // } { - // this.setSize(w,view_height); - // } + this.setSize(w, Math.min(full_height, Roo.lib.Dom.getViewportHeight(true) - 60)); } }, diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 70c70c4afb..9e5f36a472 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -112,17 +112,17 @@ for(var i=0;i