diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-10 13:14:15 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-10 13:14:15 +0200 |
commit | 15e16d335db5771778477e944d4e63ac807382b9 (patch) | |
tree | 597e7ea2f7adf12f257ccc78c04f90c06958aba3 /core/js | |
parent | 214729a5524e2c406415985717c174bedc810954 (diff) | |
parent | 038d29b8def77ad906a722f72a1501b369f9c1ee (diff) | |
download | nextcloud-server-15e16d335db5771778477e944d4e63ac807382b9.tar.gz nextcloud-server-15e16d335db5771778477e944d4e63ac807382b9.zip |
Merge pull request #17656 from owncloud/files-rightsidebar
Basic work for right sidebar
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/apps.js | 20 | ||||
-rw-r--r-- | core/js/core.json | 1 | ||||
-rw-r--r-- | core/js/js.js | 4 | ||||
-rw-r--r-- | core/js/tests/specHelper.js | 2 |
4 files changed, 25 insertions, 2 deletions
diff --git a/core/js/apps.js b/core/js/apps.js index 71170bbc23a..d0d351f5147 100644 --- a/core/js/apps.js +++ b/core/js/apps.js @@ -21,6 +21,26 @@ }; /** + * Shows the #app-sidebar and add .with-app-sidebar to subsequent siblings + */ + exports.Apps.showAppSidebar = function() { + var $appSidebar = $('#app-sidebar'); + $appSidebar.removeClass('disappear') + $('#app-content').addClass('with-app-sidebar'); + + }; + + /** + * Shows the #app-sidebar and removes .with-app-sidebar from subsequent + * siblings + */ + exports.Apps.hideAppSidebar = function() { + var $appSidebar = $('#app-sidebar'); + $appSidebar.addClass('disappear'); + $('#app-content').removeClass('with-app-sidebar'); + }; + + /** * Provides a way to slide down a target area through a button and slide it * up if the user clicks somewhere else. Used for the news app settings and * add new field. diff --git a/core/js/core.json b/core/js/core.json index 0f052b798a9..1053debaa99 100644 --- a/core/js/core.json +++ b/core/js/core.json @@ -20,6 +20,7 @@ "oc-dialogs.js", "js.js", "l10n.js", + "apps.js", "share.js", "octemplate.js", "eventsource.js", 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(); } diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js index 29293e89bcb..dbe005ba2e9 100644 --- a/core/js/tests/specHelper.js +++ b/core/js/tests/specHelper.js @@ -121,6 +121,8 @@ window.isPhantom = /phantom/i.test(navigator.userAgent); OC.TestUtil = TestUtil; } + moment.locale('en'); + // reset plugins OC.Plugins._plugins = []; |