diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-05-19 15:44:19 +0200 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-06-02 15:34:42 +0200 |
commit | de23ae735b61cc721537fade25e405b44aef1296 (patch) | |
tree | 8222c8a1761aca5284fd9596eb1d55474efa38ef /core/js/js.js | |
parent | 72ba396905acca84a9e0ba4d08649aebcd713de0 (diff) | |
download | nextcloud-server-de23ae735b61cc721537fade25e405b44aef1296.tar.gz nextcloud-server-de23ae735b61cc721537fade25e405b44aef1296.zip |
add OC.menuSpeed to control the animation speed of menu toggle
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/js/js.js b/core/js/js.js index e1d7986f01e..1ac183f0a8f 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -183,7 +183,8 @@ var OC={ appConfig: window.oc_appconfig || {}, theme: window.oc_defaults || {}, coreApps:['', 'admin','log','search','settings','core','3rdparty'], - + menuSpeed: 100, + /** * Get an absolute url to a file in an app * @param {string} app the id of the app the file belongs to @@ -531,7 +532,7 @@ var OC={ $toggle.addClass('menutoggle'); $toggle.on('click.menu', function(event) { if ($menuEl.is(OC._currentMenu)) { - $menuEl.slideUp(200); + $menuEl.slideUp(OC.menuSpeed); OC._currentMenu = null; OC._currentMenuToggle = null; return false; @@ -541,7 +542,7 @@ var OC={ // close it OC._currentMenu.hide(); } - $menuEl.slideToggle(200); + $menuEl.slideToggle(OC.menuSpeed); OC._currentMenu = $menuEl; OC._currentMenuToggle = $toggle; return false; @@ -554,7 +555,7 @@ var OC={ unregisterMenu: function($toggle, $menuEl) { // close menu if opened if ($menuEl.is(OC._currentMenu)) { - $menuEl.slideUp(200); + $menuEl.slideUp(OC.menuSpeed); OC._currentMenu = null; OC._currentMenuToggle = null; } @@ -1068,7 +1069,7 @@ function initCore() { } }); $('#settings #expand').click(function(event) { - $('#settings #expanddiv').slideToggle(200); + $('#settings #expanddiv').slideToggle(OC.menuSpeed); event.stopPropagation(); }); $('#settings #expanddiv').click(function(event){ @@ -1076,7 +1077,7 @@ function initCore() { }); //hide the user menu when clicking outside it $(document).click(function(){ - $('#settings #expanddiv').slideUp(200); + $('#settings #expanddiv').slideUp(OC.menuSpeed); }); // all the tipsy stuff needs to be here (in reverse order) to work @@ -1097,7 +1098,7 @@ function initCore() { return false; } if (OC._currentMenu) { - OC._currentMenu.slideUp(200); + OC._currentMenu.slideUp(OC.menuSpeed); } OC._currentMenu = null; OC._currentMenuToggle = null; |