From ef884aa1cdb9e9e49cdef38d191c5c8578e75898 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 3 Oct 2013 12:56:29 +0000 Subject: [PATCH] Try for a more local parent node than window to get better sizing, explicitly resize child nodes --- etemplate/js/et2_widget_split.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_widget_split.js b/etemplate/js/et2_widget_split.js index bf090ceea6..9200520aa3 100644 --- a/etemplate/js/et2_widget_split.js +++ b/etemplate/js/et2_widget_split.js @@ -71,7 +71,10 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable], // Create the dynheight component which dynamically scales the inner // container. - this.dynheight = new et2_dynheight(this.egw().window,this.div, 100); + this.dynheight = new et2_dynheight( + this.getParent().getDOMNode() || this.getInstanceManager().DOMContainer, + this.div, 100 + ); // Add something so we can see it - will be replaced if there's children this.left = $j("
Top / Left
").appendTo(this.div); @@ -200,7 +203,18 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable], resize: function() { if(this.dynheight) { - this.dynheight.update(); + this.dynheight.update(function(w,h) { + if(this.orientation == "v") + { + this.left.height(h); + this.right.height(h); + } + if(this.orientation == "h") + { + this.left.width(w); + this.right.width(w); + } + }, this); } },