]> source.dussan.org Git - nextcloud-server.git/commitdiff
move group-click initialization to groups.js and only react on elements with a data...
authorArthur Schiwon <blizzz@owncloud.com>
Tue, 25 Feb 2014 13:05:48 +0000 (14:05 +0100)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 2 Jun 2014 10:53:54 +0000 (12:53 +0200)
settings/js/users/groups.js
settings/js/users/users.js
settings/templates/users/part.grouplist.php

index 3ac8d3f36e3ef067519d82bebda1b3ac64499427..d939f0d3ad6dd83deb04485ab93b31f091ecf52f 100644 (file)
@@ -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();
index e82a6ceac13223417a29070a1c3f089056237051..e939d1d3bfc620d4e9607b5c6f909aa8daf7e24d 100644 (file)
@@ -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();
index 620049eb298c00dcc7a78e545a26cfa7a73443ff..6acf12a952f7607cdac1bc07994d3b70553b3cd4 100644 (file)
@@ -12,7 +12,7 @@
                </form>
        </li>
        <!-- Everyone -->
-       <li>
+       <li data-gid="">
                <a href="#">
                        <span>
                                <?php p($l->t('Everyone')); ?>