Set status to waiting for Dropbox and Google Drive while authenticating

This commit is contained in:
Michael Gapczynski 2013-01-09 21:47:24 -05:00
parent 7f218c4dc0
commit 78043d73e8
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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);