mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
minor changes
This commit is contained in:
parent
38267102f5
commit
ebb023c1ba
3 changed files with 37 additions and 11 deletions
|
|
@ -149,6 +149,11 @@
|
|||
pParams.name = main.HTMLDIR + lName + '.html';
|
||||
main.sendFile(pParams);
|
||||
lRet = true;
|
||||
}else if( Util.strCmp(lName, '/auth/github') ){
|
||||
Util.log('-> github');
|
||||
pParams.name = main.HTMLDIR + lName + '.html';
|
||||
main.sendFile(pParams);
|
||||
lRet = true;
|
||||
}
|
||||
|
||||
return lRet;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,18 @@
|
|||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<script src=/lib/client/auth.js async></script>
|
||||
<script>
|
||||
(function(){
|
||||
"use strict";
|
||||
|
||||
if(window.opener){
|
||||
var lGitHub = window.opener.CloudCommander.Github;
|
||||
lGitHub.init(lGitHub.getUserData, window.location.search);
|
||||
window.close();
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -72,7 +72,7 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
Util.exec(pCallBack);
|
||||
}
|
||||
else
|
||||
Util.log("Worning: token not getted...");
|
||||
Util.log('Worning: token not getted...');
|
||||
},
|
||||
lData = {
|
||||
type : 'put',
|
||||
|
|
@ -83,14 +83,23 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
|
||||
DOM.ajax(lData);
|
||||
}
|
||||
else
|
||||
window.open('https://github.com/login/oauth/authorize?client_id=' +
|
||||
GitHub_ID + '&&scope=repo,user,gist', 'Cloud Commander Auth');
|
||||
/*
|
||||
window.location =
|
||||
'https://github.com/login/oauth/authorize?client_id=' +
|
||||
GitHub_ID + '&&scope=repo,user,gist';
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -143,7 +152,7 @@ var CloudCommander, Util, DOM, $, Github, cb;
|
|||
lFiles = {},
|
||||
lHost = CloudCommander.HOST,
|
||||
lOptions = {
|
||||
description: "Uplouded by Cloud Commander from " + lHost,
|
||||
description: 'Uplouded by Cloud Commander from ' + lHost,
|
||||
|
||||
public: true
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue