From 6d67f8b03515c40b31c6247500a6c5162fa8148b Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 20 Oct 2009 01:56:12 -0600 Subject: [PATCH] Move sidebar width generation to DimpBase.js. --- imp/js/DimpBase.js | 5 +++++ imp/templates/index/index-dimp.inc | 19 ++++++++----------- imp/templates/javascript_defs_dimp.php | 1 + imp/themes/screen-dimp.css | 3 --- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index e653ce885..03367772f 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -2557,6 +2557,11 @@ var DimpBase = { /* Limit to msgList only. */ $('msgList').observe('dblclick', this.dblclickHandler.bindAsEventListener(this)); + /* Set sidebar width. */ + $('sidebarPanel').setStyle({ width: DIMP.conf.sidebar_width }); + $('dimpmain').setStyle({ left: DIMP.conf.sidebar_width }); + + /* Show page now. */ $('dimpLoading').hide(); $('dimpPage').show(); diff --git a/imp/templates/index/index-dimp.inc b/imp/templates/index/index-dimp.inc index a02bb472a..2d6ca4725 100644 --- a/imp/templates/index/index-dimp.inc +++ b/imp/templates/index/index-dimp.inc @@ -10,9 +10,6 @@ $loading_text = _("Loading..."); $has_blacklist = $registry->hasMethod('mail/blacklistFrom'); $has_whitelist = $registry->hasMethod('mail/whitelistFrom'); -// Sidebar width -$sidebar_width = max((int)$prefs->getValue('sidebar_width') - 50, 150) . 'px'; - // Quota information $show_quota = (isset($_SESSION['imp']['quota']) && is_array($_SESSION['imp']['quota'])); @@ -56,7 +53,7 @@ function _simpleButton($id, $text, $image, $imagedir = null)