diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-13 11:01:38 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-13 17:10:58 -0400 |
commit | 7f12a65c2437033fd890a7995efcc0ec3be37414 (patch) | |
tree | 6685750f990092f830963c23c0aae2e926fc7b02 /apps/files_external/js/dropbox.js | |
parent | 0e6d22e25f19f6b6b7d717d65066ad33ae5cb4f3 (diff) | |
download | nextcloud-server-7f12a65c2437033fd890a7995efcc0ec3be37414.tar.gz nextcloud-server-7f12a65c2437033fd890a7995efcc0ec3be37414.zip |
Show access granted label immediately after granting access
Diffstat (limited to 'apps/files_external/js/dropbox.js')
-rw-r--r-- | apps/files_external/js/dropbox.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/js/dropbox.js b/apps/files_external/js/dropbox.js index 6fc362fb086..08ce88b1026 100644 --- a/apps/files_external/js/dropbox.js +++ b/apps/files_external/js/dropbox.js @@ -9,6 +9,7 @@ $(document).ready(function() { } else { var pos = window.location.search.indexOf('oauth_token') + 12 var token = $(this).find('.configuration [data-parameter="token"]'); + var access = true; if (pos != -1 && window.location.search.substr(pos, $(token).val().length) == $(token).val()) { var token_secret = $(this).find('.configuration [data-parameter="token_secret"]'); var tr = $(this); @@ -18,10 +19,12 @@ $(document).ready(function() { $(token_secret).val(result.access_token_secret); OC.MountConfig.saveStorage(tr); } else { + access = false; OC.dialogs.alert(result.data.message, 'Error configuring Dropbox storage'); } }); - } else if ($(this).find('.configuration #granted').length == 0) { + } + if (access && $(this).find('.configuration #granted').length == 0) { $(this).find('.configuration input').attr('disabled', 'disabled'); $(this).find('.configuration').append('<span id="granted">Access granted</span>'); } |