From faebee5f25ba58a346f7bbf685ce535a5367f9d5 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Fri, 11 May 2012 20:39:48 -0400 Subject: [PATCH] Turn async off when fetching users to make sure the users get removed from the select form --- apps/files_sharing/js/share.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index faa6c52b2a..6f9468c4e7 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');