[Pkg-owncloud-commits] [owncloud] 02/22: Use global apps slide toggle logic

David Prévot taffit at moszumanska.debian.org
Fri Aug 29 14:48:56 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 02ac579eaefe13d6b80a8c0c5edecc361a3c84d2
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Mon Aug 11 16:34:24 2014 +0200

    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.
---
 settings/js/users/groups.js                | 24 ------------------------
 settings/templates/users/part.setquota.php |  4 ++--
 2 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 58f7770..84142a1 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 fc5624d..ee9b918 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>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list