[FIX] when dialog is resized, the content pane should reflect the new height too

bzr revid: fme@openerp.com-20120516145354-lj6tr06ktatirh0b
This commit is contained in:
Fabien Meghazi 2012-05-16 16:53:54 +02:00
commit e30d3d99fe
1 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,10 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
},
on_resized: function() {
//openerp.log("Dialog resized to %d x %d", this.$element.width(), this.$element.height());
var $dialog = this.$element.parent(".ui-dialog");
var btnpane_height = $dialog.find(".ui-dialog-buttonpane").height();
var content_height = ($dialog.height() - btnpane_height - 62) + "px";
this.$element.css({ 'max-height': content_height, 'height': content_height});
},
stop: function () {
// Destroy widget