summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-08-11 16:34:24 +0200
committerVincent Petry <pvince81@owncloud.com>2014-08-12 12:00:34 +0200
commitc208796c470ff50db3a62141e0c8ae971991ec4a (patch)
treeed59980bb7a470eb9946ca1d090ac28cc253dd98 /settings
parente1a47683ef798f0569edebdf66e340ca439e357f (diff)
downloadnextcloud-server-c208796c470ff50db3a62141e0c8ae971991ec4a.tar.gz
nextcloud-server-c208796c470ff50db3a62141e0c8ae971991ec4a.zip
Use global apps slide toggle logic
Remove local app settings slide logic and make it use the global one triggered by the "data-apps-slide-toggle" attribute.
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/groups.js24
-rw-r--r--settings/templates/users/part.setquota.php4
2 files changed, 2 insertions, 26 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index fe06edff34d..258b6aa7efd 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -289,28 +289,4 @@ $(document).ready( function () {
$userGroupList.on('click', '.isgroup', function () {
GroupList.showGroup(GroupList.getElementGID(this));
});
-
- // Implements Quota Settings Toggle.
- var $appSettings = $('#app-settings');
- $('#app-settings-header').on('click keydown',function(event) {
- if(wrongKey(event)) {
- return;
- }
- if($appSettings.hasClass('open')) {
- $appSettings.switchClass('open', '');
- } else {
- $appSettings.switchClass('', 'open');
- }
- });
- $('body').on('click', function(event){
- if($appSettings.find(event.target).length === 0) {
- $appSettings.switchClass('open', '');
- }
- });
-
});
-
-var wrongKey = function(event) {
- return ((event.type === 'keydown' || event.type === 'keypress') &&
- (event.keyCode !== 32 && event.keyCode !== 13));
-};
diff --git a/settings/templates/users/part.setquota.php b/settings/templates/users/part.setquota.php
index fc5624d069a..ee9b918eace 100644
--- a/settings/templates/users/part.setquota.php
+++ b/settings/templates/users/part.setquota.php
@@ -1,5 +1,5 @@
<div id="app-settings-header">
- <button class="settings-button" tabindex="0"></button>
+ <button class="settings-button" tabindex="0" data-apps-slide-toggle="#app-settings-content"></button>
</div>
<div id="app-settings-content">
<div class="quota">
@@ -36,4 +36,4 @@
</select>
<?php endif; ?>
</div>
-</div> \ No newline at end of file
+</div>