summaryrefslogtreecommitdiffstats
path: root/core/js/apps.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-08-25 11:07:47 +0200
committerVincent Petry <pvince81@owncloud.com>2015-08-25 11:07:47 +0200
commita86602a1575d829a64588b35eb073484ec9543db (patch)
treee74c4bfeda9009e244f9c11a6d97d7df0197098d /core/js/apps.js
parent2f86be9ced33574a76e821efa45f1ab3939b61e6 (diff)
downloadnextcloud-server-a86602a1575d829a64588b35eb073484ec9543db.tar.gz
nextcloud-server-a86602a1575d829a64588b35eb073484ec9543db.zip
Properly hide sidebar when switching between files app sections
Since there are multiple sidebars, one for each files app section, we need to hide the correct ones.
Diffstat (limited to 'core/js/apps.js')
-rw-r--r--core/js/apps.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/js/apps.js b/core/js/apps.js
index d0d351f5147..f148de3b2e9 100644
--- a/core/js/apps.js
+++ b/core/js/apps.js
@@ -22,9 +22,11 @@
/**
* Shows the #app-sidebar and add .with-app-sidebar to subsequent siblings
+ *
+ * @param {Object} [$el] sidebar element to show, defaults to $('#app-sidebar')
*/
- exports.Apps.showAppSidebar = function() {
- var $appSidebar = $('#app-sidebar');
+ exports.Apps.showAppSidebar = function($el) {
+ var $appSidebar = $el || $('#app-sidebar');
$appSidebar.removeClass('disappear')
$('#app-content').addClass('with-app-sidebar');
@@ -33,9 +35,11 @@
/**
* Shows the #app-sidebar and removes .with-app-sidebar from subsequent
* siblings
+ *
+ * @param {Object} [$el] sidebar element to hide, defaults to $('#app-sidebar')
*/
- exports.Apps.hideAppSidebar = function() {
- var $appSidebar = $('#app-sidebar');
+ exports.Apps.hideAppSidebar = function($el) {
+ var $appSidebar = $el || $('#app-sidebar');
$appSidebar.addClass('disappear');
$('#app-content').removeClass('with-app-sidebar');
};