mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
moved out showHelp function from view to help
This commit is contained in:
parent
53d7a0cb7b
commit
3002819ef3
2 changed files with 5 additions and 38 deletions
|
|
@ -33,7 +33,7 @@ var CloudCmd, Util, DOM;
|
|||
data : Util.stringifyJSON(lData),
|
||||
success:function(pResult){
|
||||
Images.hideLoad();
|
||||
CloudCmd.View.Show(pResult);
|
||||
CloudCmd.View.show(pResult);
|
||||
},
|
||||
|
||||
error: Images.showError
|
||||
|
|
|
|||
|
|
@ -36,9 +36,8 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
};
|
||||
|
||||
this.init = function(pCallBack){
|
||||
debugger;
|
||||
Util.loadOnLoad([
|
||||
pCallBack || View.show,
|
||||
pCallBack || Util.retExec(View.show, null),
|
||||
load,
|
||||
DOM.jqueryLoad
|
||||
]);
|
||||
|
|
@ -49,29 +48,6 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
delete View.init;
|
||||
};
|
||||
|
||||
this.showHelp = function(){
|
||||
Images.showLoad();
|
||||
DOM.ajax({
|
||||
url: '/README.md',
|
||||
success: function (pData){
|
||||
var lData = {text: pData};
|
||||
DOM.ajax({
|
||||
method : 'post',
|
||||
url : 'https://api.github.com/markdown',
|
||||
data : Util.stringifyJSON(lData),
|
||||
success:function(pResult){
|
||||
Images.hideLoad();
|
||||
$.fancybox(pResult, Config);
|
||||
},
|
||||
|
||||
error: Images.showError
|
||||
});
|
||||
},
|
||||
|
||||
error:Images.showError
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* function shows FancyBox
|
||||
*/
|
||||
|
|
@ -139,22 +115,13 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
|
||||
function listener(pEvent){
|
||||
var lF3 = Key.F3,
|
||||
lF1 = Key.F1,
|
||||
lIsBind = Key.isBind(),
|
||||
lKey = pEvent.keyCode;
|
||||
|
||||
/* если клавиши можно обрабатывать */
|
||||
if (lIsBind) {
|
||||
switch(lKey){
|
||||
case lF3:
|
||||
view();
|
||||
DOM.preventDefault(pEvent);
|
||||
break;
|
||||
|
||||
case lF1:
|
||||
View.showHelp();
|
||||
break;
|
||||
}
|
||||
if (lIsBind && lKey === lF3) {
|
||||
view();
|
||||
DOM.preventDefault(pEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue