mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
DropBox, GDrive and GitHub modules now look the same
This commit is contained in:
parent
56a8922691
commit
bfc4baab0f
7 changed files with 101 additions and 103 deletions
|
|
@ -84,21 +84,8 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
DOM.ajax(lData);
|
||||
}
|
||||
else{
|
||||
|
||||
var lUrl = '//' + window.location.host + '/auth/github',
|
||||
left = 140,
|
||||
top = 187,
|
||||
width = 1000,
|
||||
height = 650,
|
||||
|
||||
lOptions = 'left=' + left +
|
||||
',top=' + top +
|
||||
',width=' + width +
|
||||
',height=' + height +
|
||||
',personalbar=0,toolbar=0' +
|
||||
',scrollbars=1,resizable=1';
|
||||
|
||||
window.open(lUrl, 'Cloud Commander Auth', lOptions);
|
||||
var lUrl = '//' + window.location.host + '/auth/github';
|
||||
DOM.openWindow(lUrl);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -142,11 +129,14 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
/**
|
||||
* function creates gist
|
||||
*/
|
||||
cloudcmd.GitHub.uploadFile = function(pContent, pFileName){
|
||||
if(pContent){
|
||||
cloudcmd.GitHub.uploadFile = function(pParams, pCallBack){
|
||||
var lContent = pParams.data,
|
||||
lName = pParams.name;
|
||||
|
||||
if(lContent){
|
||||
DOM.Images.showLoad();
|
||||
if(!pFileName)
|
||||
pFileName = Util.getDate();
|
||||
if(!lName)
|
||||
lName = Util.getDate();
|
||||
|
||||
var lGist = GithubLocal.getGist(),
|
||||
lFiles = {},
|
||||
|
|
@ -157,8 +147,8 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
public: true
|
||||
};
|
||||
|
||||
lFiles[pFileName] ={
|
||||
content: pContent
|
||||
lFiles[lName] ={
|
||||
content: lContent
|
||||
};
|
||||
|
||||
lOptions.files = lFiles;
|
||||
|
|
@ -167,10 +157,12 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
DOM.Images.hideLoad();
|
||||
console.log(pError || pData);
|
||||
console.log(pData && pData.html_url);
|
||||
|
||||
Util.exec(pCallBack);
|
||||
});
|
||||
}
|
||||
|
||||
return pContent;
|
||||
return lContent;
|
||||
};
|
||||
|
||||
cloudcmd.GitHub.init = function(pCallBack){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue