From f75264c66f6524a5822dc1083ac5f3361f1cb5c2 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 9 Sep 2015 13:56:50 +0000 Subject: [PATCH] WIP toggle sidebar menu: - Fix toggleSide bar initialization --- phpgwapi/js/framework/fw_desktop.js | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/phpgwapi/js/framework/fw_desktop.js b/phpgwapi/js/framework/fw_desktop.js index b07d95c899..f30ff33d9b 100644 --- a/phpgwapi/js/framework/fw_desktop.js +++ b/phpgwapi/js/framework/fw_desktop.js @@ -265,7 +265,6 @@ { this.sideboxSizeCallback(_app.sideboxWidth); this.splitterUi.constraints[0].size = _app.sideboxWidth; - } _app.parentFw.scrollAreaUi.update(); _app.parentFw.scrollAreaUi.setScrollPos(0); @@ -275,6 +274,13 @@ //...and scroll to the top this.scrollAreaUi.setScrollPos(0); + + // Handles toggleSidebar initialization + if (typeof framework != 'undefined') + { + framework.getToggleSidebarState(); + framework.activeApp.browser.callResizeHandler(); + } }, /** @@ -409,20 +415,6 @@ this.tag.parentFw.scrollAreaUi.update(); }, - /** - * tabClickCallback is used internally by egw_fw in order to handle clicks on - * a tab. - * - * @param {egw_fw_ui_tab} _sender specifies the tab ui object, the user has clicked - */ - tabClickCallback: function(_sender) - { - this._super.apply(this,arguments); - - framework.getToggleSidebarState(); - framework.activeApp.browser.callResizeHandler(); - }, - /** * toggleSidebar callback function, handles preference and resize * @param {string} _state state can be on/off