[OBCQL] Fixed setWidgetHeight method.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Thu, 30 Dec 2010 14:13:36 +0100
changeset 9499 7191314bb53e
parent 9498 ac4ce201819f
child 9500 10c07f84553f
[OBCQL] Fixed setWidgetHeight method.
modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
--- a/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Thu Dec 30 14:00:35 2010 +0100
+++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Thu Dec 30 14:13:36 2010 +0100
@@ -52,7 +52,13 @@
                   (this.grid.cellHeight * (this.parameters.RowsNumber ? this.parameters.RowsNumber : 10)) +
                   this.grid.summaryRowHeight + 2;
 
-    this.setHeight(headerHeight + newGridHeight + 13);
+    var newHeight = headerHeight + newGridHeight + 13;
+    this.setHeight(newHeight);
+    if (this.parentElement) {
+      var heightDiff = newHeight - currentHeight,
+          parentHeight = this.parentElement.getHeight();
+      this.parentElement.setHeight(parentHeight + heightDiff);
+    }
   },
 
   createWindowContents: function(){