diff options
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/apps.js | 10 | ||||
-rw-r--r-- | core/js/js.js | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/core/js/apps.js b/core/js/apps.js index 5d9bbeb870a..d0d351f5147 100644 --- a/core/js/apps.js +++ b/core/js/apps.js @@ -25,9 +25,8 @@ */ exports.Apps.showAppSidebar = function() { var $appSidebar = $('#app-sidebar'); - $appSidebar - .removeClass('disappear') - .find('~').addClass('with-app-sidebar'); + $appSidebar.removeClass('disappear') + $('#app-content').addClass('with-app-sidebar'); }; @@ -37,9 +36,8 @@ */ exports.Apps.hideAppSidebar = function() { var $appSidebar = $('#app-sidebar'); - $appSidebar - .addClass('disappear') - .find('~ .with-app-sidebar').removeClass('with-app-sidebar'); + $appSidebar.addClass('disappear'); + $('#app-content').removeClass('with-app-sidebar'); }; /** diff --git a/core/js/js.js b/core/js/js.js index 45c9c90362f..72d4edd28dd 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1366,13 +1366,13 @@ function initCore() { // if there is a scrollbar … if($('#app-content').get(0).scrollHeight > $('#app-content').height()) { if($(window).width() > 768) { - controlsWidth = $('#content').width() - $('#app-navigation').width() - getScrollBarWidth(); + controlsWidth = $('#content').width() - $('#app-navigation').width() - $('#app-sidebar').width() - getScrollBarWidth(); } else { controlsWidth = $('#content').width() - getScrollBarWidth(); } } else { // if there is none if($(window).width() > 768) { - controlsWidth = $('#content').width() - $('#app-navigation').width(); + controlsWidth = $('#content').width() - $('#app-navigation').width() - $('#app-sidebar').width(); } else { controlsWidth = $('#content').width(); } |