From: Michael Gapczynski Date: Sat, 12 May 2012 00:39:48 +0000 (-0400) Subject: Turn async off when fetching users to make sure the users get removed from the select... X-Git-Tag: v4.0.0RC~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=faebee5f25ba58a346f7bbf685ce535a5367f9d5;p=nextcloud-server.git Turn async off when fetching users to make sure the users get removed from the select form --- diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index faa6c52b2aa..6f9468c4e79 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -82,7 +82,7 @@ OC.Share={ html += ''; $(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');