X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fbootstrap%2FModal.js;h=d3d26088663d93eda90402b0f3a2a78f1dae2f99;hb=debeedba65a3b0548fffa79b21238ad173737a3b;hp=73b5cf3039f0abbc4c10d2291a465764f5b62c16;hpb=55e340ab82f2f8748b5c941c995a67752ab8b147;p=roojs1 diff --git a/Roo/bootstrap/Modal.js b/Roo/bootstrap/Modal.js index 73b5cf3039..d3d2608866 100644 --- a/Roo/bootstrap/Modal.js +++ b/Roo/bootstrap/Modal.js @@ -287,9 +287,12 @@ 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) - 60 + this.height || Roo.lib.Dom.getViewportHeight(true) // catering margin-top 30 margin-bottom 30 ); return; } @@ -452,22 +455,18 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { { //this.el.select('.modal-footer').() }, - diff : false, resizeTo: function(w,h) { - // skip.. ?? why?? - this.dialogEl.setWidth(w); - if (this.diff === false) { - this.diff = this.dialogEl.getHeight() - this.bodyEl.getHeight(); - } - - this.bodyEl.setHeight(h - this.diff); + + var diff = this.headerEl.getHeight() + this.footerEl.getHeight() + 30; // dialog margin-bottom: 30 + this.bodyEl.setHeight(h - diff); + this.fireEvent('resize', this); - }, + setContentSize : function(w, h) {