summaryrefslogtreecommitdiffstats
path: root/core/js/apps.js
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-26 18:06:47 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-26 18:06:47 +0200
commitdaecf4b2c14bccb27cc6c5462570c675aa558816 (patch)
tree7bc0ad51e1c798c9488859440edbe47b07649692 /core/js/apps.js
parentc2330e558ebc8396f60be12db95a7ebb9f4e9385 (diff)
downloadnextcloud-server-daecf4b2c14bccb27cc6c5462570c675aa558816.tar.gz
nextcloud-server-daecf4b2c14bccb27cc6c5462570c675aa558816.zip
disable dynamic slide toggle by default and offer a way to enable it
Diffstat (limited to 'core/js/apps.js')
-rw-r--r--core/js/apps.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/core/js/apps.js b/core/js/apps.js
index 0308d1fef07..5f221bb9826 100644
--- a/core/js/apps.js
+++ b/core/js/apps.js
@@ -8,10 +8,18 @@
* @copyright Bernhard Posselt 2014
*/
-(function (document, $) {
+(function (document, $, exports) {
'use strict';
+ var dynamicSlideToggleEnabled = false;
+
+ exports.Apps = {
+ enableDynamicSlideToggle: function () {
+ dynamicSlideToggleEnabled = true;
+ }
+ };
+
/**
* 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
@@ -22,9 +30,13 @@
* <div class=".slide-area" class="hidden">I'm sliding up</div>
*/
var registerAppsSlideToggle = function () {
+ var buttons = $('[data-apps-slide-toggle]');
+
$(document).click(function (event) {
- var buttons = $('[data-apps-slide-toggle]');
+ if (dynamicSlideToggleEnabled) {
+ buttons = $('[data-apps-slide-toggle]');
+ }
buttons.each(function (index, button) {
@@ -61,4 +73,4 @@
registerAppsSlideToggle();
});
-}(document, jQuery)); \ No newline at end of file
+}(document, jQuery, OC)); \ No newline at end of file