From 1a4705ca5c5fbbd39ca039f842c1e117bee8288a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 29 Sep 2015 12:17:14 +0000 Subject: [PATCH] Fix split widget does not take right size --- etemplate/js/et2_widget_split.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/etemplate/js/et2_widget_split.js b/etemplate/js/et2_widget_split.js index f0c09e8a61..f05b536a44 100644 --- a/etemplate/js/et2_widget_split.js +++ b/etemplate/js/et2_widget_split.js @@ -182,7 +182,7 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable,et2_IPrint], sizeTop: this.dynheight.outerNode.height() / 2, sizeLeft: this.dynheight.outerNode.width() / 2 }; - + var widget = this; //Convert percent size to pixel var per2pix = function(_size) @@ -295,19 +295,16 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable,et2_IPrint], { // Store current position in preferences var size = self.orientation == "v" ? {sizeLeft: self.left.width()} : {sizeTop: self.left.height()}; - self.prefSize = size[this.orientation == "v" ?'sizeLeft' : 'sizeTop']; + self.prefSize = size[self.orientation == "v" ?'sizeLeft' : 'sizeTop']; var prefInPercent = self.orientation == "v" ?{sizeLeft:pix2per(size.sizeLeft)}:{sizeTop:pix2per(size.sizeTop)}; self.egw().set_preference(self.egw().getAppName(), 'splitter-size-' + self.id, prefInPercent); } // Ok, update children self.iterateOver(function(widget) { - if(widget != self) - { widget.resize(); // Above forcing is not enough for Firefox, defer window.setTimeout(jQuery.proxy(function() {this.resize();},widget),200); - } },self,et2_IResizeable); }); }