From 718dc25815c130952415f86380c48a3c303c5da0 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 30 Sep 2015 15:29:26 +0000 Subject: [PATCH] Make 100% an invalid preference size, fixes mail splitter losing splitter size preference --- etemplate/js/et2_widget_split.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_split.js b/etemplate/js/et2_widget_split.js index f05b536a44..b043b03c9d 100644 --- a/etemplate/js/et2_widget_split.js +++ b/etemplate/js/et2_widget_split.js @@ -297,7 +297,10 @@ var et2_split = et2_DOMWidget.extend([et2_IResizeable,et2_IPrint], var size = self.orientation == "v" ? {sizeLeft: self.left.width()} : {sizeTop: self.left.height()}; 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); + if(parseInt(self.orientation == 'v' ? prefInPercent.sizeLeft : prefInPercent.sizeTop) < 100) + { + self.egw().set_preference(self.egw().getAppName(), 'splitter-size-' + self.id, prefInPercent); + } } // Ok, update children