diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-12-06 17:23:51 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-12-06 17:25:09 +0100 |
commit | e13be94e56ec59d92b6c9cf67b7a17bd03438efb (patch) | |
tree | fa297d8540bcfc41a7edcb681eeab897e5e29922 /apps/files_external/js/settings.js | |
parent | 4dd84b3627d5667b61638363244621ad93a5632f (diff) | |
download | nextcloud-server-e13be94e56ec59d92b6c9cf67b7a17bd03438efb.tar.gz nextcloud-server-e13be94e56ec59d92b6c9cf67b7a17bd03438efb.zip |
Fixed Dropbox/Google storage async save call
When clicking "Grant access", the settings for Dropbox/Google were saved
through a call that gets cancelled when redirecting to the grant page
(for example in Firefox)
This fix makes sure the "save settings" call finished before redirecting
to the grant page.
Fixes #6176
Diffstat (limited to 'apps/files_external/js/settings.js')
-rw-r--r-- | apps/files_external/js/settings.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 886c324e338..895f97bd2c3 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -12,7 +12,7 @@ function updateStatus(statusEl, result){ } OC.MountConfig={ - saveStorage:function(tr) { + saveStorage:function(tr, callback) { var mountPoint = $(tr).find('.mountPoint input').val(); if (mountPoint == '') { return false; @@ -84,9 +84,15 @@ OC.MountConfig={ }, success: function(result) { status = updateStatus(statusSpan, result); + if (callback) { + callback(status); + } }, error: function(result){ status = updateStatus(statusSpan, result); + if (callback) { + callback(status); + } } }); }); @@ -137,9 +143,15 @@ OC.MountConfig={ }, success: function(result) { status = updateStatus(statusSpan, result); + if (callback) { + callback(status); + } }, error: function(result){ status = updateStatus(statusSpan, result); + if (callback) { + callback(status); + } } }); } |