From 7e7095a6425233744b3f170c7d77052e70e8a3ce Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 20 Dec 2012 07:05:04 -0500 Subject: [PATCH] chenged description --- config.json | 4 ++-- lib/client/storage/_gdrive.js | 35 +++++++++++++---------------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/config.json b/config.json index c014fd05..aa2b1a72 100644 --- a/config.json +++ b/config.json @@ -5,8 +5,8 @@ "minification" : { "js" : false, "css" : false, - "html" : true, - "img" : true + "html" : false, + "img" : false }, "github_key" : "891c251b925e4e967fa9", "github_secret" : "afe9bed1e810c5dc44c4c2a953fc6efb1e5b0545", diff --git a/lib/client/storage/_gdrive.js b/lib/client/storage/_gdrive.js index bedf6c3d..04319b49 100644 --- a/lib/client/storage/_gdrive.js +++ b/lib/client/storage/_gdrive.js @@ -9,29 +9,20 @@ var CloudCommander, Util, DOM, gapi; function authorize(pData){ /* https://developers.google.com/drive/credentials */ - Util.setTimeout({ - func : function(pCallBack){ - var lCLIENT_ID = '255175681917.apps.googleusercontent.com', - lSCOPES = 'https://www.googleapis.com/auth/drive', - lParams = { - 'client_id' : lCLIENT_ID, - 'scope' : lSCOPES, - 'immediate' : true - }; - - gapi.auth.authorize(lParams, pCallBack); - }, - - callback : function(pAuthResult){ - var lRet; - if (pAuthResult && !pAuthResult.error){ - uploadFile(pData); - - lRet = true; - } - return lRet; - } + var lCLIENT_ID = '255175681917.apps.googleusercontent.com', + lSCOPES = 'https://www.googleapis.com/auth/drive', + lParams = { + 'client_id' : lCLIENT_ID, + 'scope' : lSCOPES, + 'immediate' : false + }; + + setTimeout(function() { + gapi.auth.authorize(lParams, function(pAuthResult){ + if (pAuthResult && !pAuthResult.error) + uploadFile(pData); }); + }, 500); } function load(pData){