From 02953e520dd525b8ed1189be5bfbe47f043a7fc8 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 18 Feb 2015 10:07:51 -0500 Subject: [PATCH] chore(storage) add " " --- lib/client/storage/_dropbox.js | 5 ++--- lib/client/storage/_dropbox_chooser.js | 15 +++++++-------- lib/client/storage/_gdrive.js | 9 ++++----- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/lib/client/storage/_dropbox.js b/lib/client/storage/_dropbox.js index 19436c20..c6279c37 100644 --- a/lib/client/storage/_dropbox.js +++ b/lib/client/storage/_dropbox.js @@ -15,7 +15,6 @@ var CloudCmd, Util, DOM, CloudFunc, Dropbox, cb, Client; getUserData, Util.exec.ret(callback) ]); - } cb = function (err, data) { console.log(err || data);}; @@ -49,7 +48,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dropbox, cb, Client; } /** * function logins on dropbox - * + * * @param pData = {key, secret} */ this.login = function(callback) { @@ -169,7 +168,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dropbox, cb, Client; if (!file.isFile) size = 'dir'; - else + else size = CloudFunc.getShortSize(file.size); json.files.push({ diff --git a/lib/client/storage/_dropbox_chooser.js b/lib/client/storage/_dropbox_chooser.js index caa433fa..bac28b25 100644 --- a/lib/client/storage/_dropbox_chooser.js +++ b/lib/client/storage/_dropbox_chooser.js @@ -24,15 +24,14 @@ var Util, CloudCmd, DOM, Dropbox; Util.time('dropbox load'); DOM.Files.get('config', function(error, config) { - var element = DOM.load({ - src : CHOOSER_API, - notAppend : true, - id : 'dropboxjs', - func : DropBoxStore.choose + var lDropBoxId = config.dropbox_chooser_key, + element = DOM.load({ + src : CHOOSER_API, + notAppend : true, + id : 'dropboxjs', + func : DropBoxStore.choose + }); - }); - - var lDropBoxId = config.dropbox_chooser_key; element.setAttribute('data-app-key', lDropBoxId); document.body.appendChild(element); diff --git a/lib/client/storage/_gdrive.js b/lib/client/storage/_gdrive.js index f647d226..785f3b4e 100644 --- a/lib/client/storage/_gdrive.js +++ b/lib/client/storage/_gdrive.js @@ -33,10 +33,9 @@ var CloudCmd, Util, DOM, gapi; setTimeout(function() { gapi.auth.authorize(lParams, function(pAuthResult) { - if (pAuthResult && !pAuthResult.error) gapi.client.load('drive', 'v2', Util.exec.ret(callback)); - }); + }); }, 1500); }); @@ -74,9 +73,9 @@ var CloudCmd, Util, DOM, gapi; 'Content-Transfer-Encoding: base64\r\n' + '\r\n' + base64Data + - close_delim; + close_delim, - var request = gapi.client.request({ + request = gapi.client.request({ 'path': '/upload/drive/v2/files', 'method': 'POST', 'params': {'uploadType': 'multipart'}, @@ -104,4 +103,4 @@ var CloudCmd, Util, DOM, gapi; }; CloudCmd.GDrive = GDrive; -})(CloudCmd, Util, DOM); \ No newline at end of file +})(CloudCmd, Util, DOM);