Set status to waiting for Dropbox and Google Drive while authenticating
This commit is contained in:
parent
7f218c4dc0
commit
78043d73e8
2 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,9 @@ $(document).ready(function() {
|
|||
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);
|
||||
var statusSpan = $(tr).find('.status span');
|
||||
statusSpan.removeClass();
|
||||
statusSpan.addClass('waiting');
|
||||
$.post(OC.filePath('files_external', 'ajax', 'dropbox.php'), { step: 2, app_key: app_key, app_secret: app_secret, request_token: $(token).val(), request_token_secret: $(token_secret).val() }, function(result) {
|
||||
if (result && result.status == 'success') {
|
||||
$(token).val(result.access_token);
|
||||
|
|
|
@ -22,6 +22,9 @@ $(document).ready(function() {
|
|||
params[key] = value;
|
||||
});
|
||||
if (params['oauth_token'] !== undefined && params['oauth_verifier'] !== undefined && decodeURIComponent(params['oauth_token']) == $(token).val()) {
|
||||
var statusSpan = $(tr).find('.status span');
|
||||
statusSpan.removeClass();
|
||||
statusSpan.addClass('waiting');
|
||||
$.post(OC.filePath('files_external', 'ajax', 'google.php'), { step: 2, oauth_verifier: params['oauth_verifier'], request_token: $(token).val(), request_token_secret: $(token_secret).val() }, function(result) {
|
||||
if (result && result.status == 'success') {
|
||||
$(token).val(result.access_token);
|
||||
|
|
Loading…
Reference in a new issue