summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-01-26 21:22:22 +0100
committerVincent Petry <pvince81@owncloud.com>2015-01-26 21:22:22 +0100
commit182b1937bbf4faf057a1db9feb069a9488461da7 (patch)
tree4fc5a2642a2e89d831a80004b623ee38560f2d63 /apps/files_sharing/js
parentbd888748bd9d0d9e9268447501fe35abf121083b (diff)
downloadnextcloud-server-182b1937bbf4faf057a1db9feb069a9488461da7.tar.gz
nextcloud-server-182b1937bbf4faf057a1db9feb069a9488461da7.zip
Only reload file list after remote share accept request returns
When accepting a remote share, an ajax request is sent to the server. Only once this request returns should the file list be reloaded.
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r--apps/files_sharing/js/external.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/js/external.js b/apps/files_sharing/js/external.js
index 31407f28ffd..a4bd3b45075 100644
--- a/apps/files_sharing/js/external.js
+++ b/apps/files_sharing/js/external.js
@@ -131,8 +131,10 @@
function(result, share) {
if (result) {
// Accept
- $.post(OC.generateUrl('/apps/files_sharing/api/externalShares'), {id: share.id});
- fileList.reload();
+ $.post(OC.generateUrl('/apps/files_sharing/api/externalShares'), {id: share.id})
+ .then(function() {
+ fileList.reload();
+ });
} else {
// Delete
$.ajax({