summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-08-11 16:34:24 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-08-21 08:38:55 +0200
commit02ac579eaefe13d6b80a8c0c5edecc361a3c84d2 (patch)
tree40e817dbf5113fa04eff158e2d71f1908c0aabca /settings
parentb94c88266bdab9a64633f7fa00734ec5c444f1c5 (diff)
downloadnextcloud-server-02ac579eaefe13d6b80a8c0c5edecc361a3c84d2.tar.gz
nextcloud-server-02ac579eaefe13d6b80a8c0c5edecc361a3c84d2.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 58f77705121..84142a1a0d0 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -287,28 +287,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>