diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-02-25 14:05:48 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-06-02 12:53:54 +0200 |
commit | faab6c095c895f146ac0f749d287040fd46c1cf2 (patch) | |
tree | 8ec862c5b200c5d47f7c57ba5588f9dabe9254f0 /settings | |
parent | 65aa20433c796c40592e6031eb8ba323c171c108 (diff) | |
download | nextcloud-server-faab6c095c895f146ac0f749d287040fd46c1cf2.tar.gz nextcloud-server-faab6c095c895f146ac0f749d287040fd46c1cf2.zip |
move group-click initialization to groups.js and only react on elements with a data-gid attribute given
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/users/groups.js | 12 | ||||
-rw-r--r-- | settings/js/users/users.js | 9 | ||||
-rw-r--r-- | settings/templates/users/part.grouplist.php | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js index 3ac8d3f36e3..d939f0d3ad6 100644 --- a/settings/js/users/groups.js +++ b/settings/js/users/groups.js @@ -75,7 +75,7 @@ $(document).ready( function () { if (e.target.id !== 'newgroup-form') { $("#newgroup-form").hide(); $("#newgroup-init").show(); - } + } }); }); @@ -120,6 +120,16 @@ $(document).ready( function () { } ) }); + + // click on group name + // FIXME: also triggered when clicking on "remove" + $('ul').on('click', 'li[data-gid]', function (event) { + var li = $(this); + var gid = $(li).attr('data-gid'); + // Call function for handling delete/undo on Groups + GroupList.showGroup(gid); + }); + // Implements Groupname editing. $('#app-navigation').on('click', 'img.rename', function (event) { event.stopPropagation(); diff --git a/settings/js/users/users.js b/settings/js/users/users.js index e82a6ceac13..e939d1d3bfc 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -503,15 +503,6 @@ $(document).ready(function () { }); }); - // click on group name - // FIXME: also triggered when clicking on "remove" - $('ul').on('click', 'li', function (event) { - var li = $(this); - var gid = $(li).attr('data-gid'); - // Call function for handling delete/undo on Groups - GroupList.showGroup(gid); - }); - $('#newuser').submit(function (event) { event.preventDefault(); var username = $('#newusername').val(); diff --git a/settings/templates/users/part.grouplist.php b/settings/templates/users/part.grouplist.php index 620049eb298..6acf12a952f 100644 --- a/settings/templates/users/part.grouplist.php +++ b/settings/templates/users/part.grouplist.php @@ -12,7 +12,7 @@ </form> </li> <!-- Everyone --> - <li> + <li data-gid=""> <a href="#"> <span> <?php p($l->t('Everyone')); ?> |