]> source.dussan.org Git - nextcloud-server.git/commitdiff
Turn async off when fetching users to make sure the users get removed from the select...
authorMichael Gapczynski <GapczynskiM@gmail.com>
Sat, 12 May 2012 00:39:48 +0000 (20:39 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Sat, 12 May 2012 00:39:48 +0000 (20:39 -0400)
apps/files_sharing/js/share.js

index faa6c52b2aa6b93ac97ec12aac3d439cf621e46d..6f9468c4e79432230f730c1ff85e8d250252f0da 100644 (file)
@@ -82,7 +82,7 @@ OC.Share={
                html += '</div>';
                $(html).appendTo(appendTo);
                if (OC.Share.usersAndGroups.length < 1) {
-                       $.getJSON(OC.filePath('files_sharing', 'ajax', 'userautocomplete.php'), function(users) {
+                       $.ajax({type: 'GET', url: OC.filePath('files_sharing', 'ajax', 'userautocomplete.php'), async: false, success: function(users) {
                                if (users) {
                                        OC.Share.usersAndGroups = users;
                                        $.each(users, function(index, user) {
@@ -90,7 +90,7 @@ OC.Share={
                                        });
                                        $('#share_with').trigger('liszt:updated');
                                }
-                       });
+                       }});
                } else {
                        $.each(OC.Share.usersAndGroups, function(index, user) {
                                $(user).appendTo('#share_with');