mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactor(menu) getConfig, show
This commit is contained in:
parent
e6174b3595
commit
6db2bdbab6
1 changed files with 7 additions and 7 deletions
|
|
@ -181,8 +181,8 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
function getConfig () {
|
||||
var lRet,
|
||||
lMenuItems = {
|
||||
'View' : show.bind(null, 'View'),
|
||||
'Edit' : show.bind(null, 'Edit'),
|
||||
'View' : Util.bind(show, 'View'),
|
||||
'Edit' : Util.bind(show, 'Edit'),
|
||||
'Rename' : function() {
|
||||
setTimeout(DOM.renameCurrent, 100);
|
||||
},
|
||||
|
|
@ -234,12 +234,12 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
|
||||
return lRet;
|
||||
|
||||
function show(pName) {
|
||||
var lEditor = CloudCmd[pName],
|
||||
lResult = Util.exec(lEditor);
|
||||
function show(name) {
|
||||
var module = CloudCmd[name],
|
||||
ret = Util.exec(module);
|
||||
|
||||
if (!lResult)
|
||||
Util.exec(lEditor.show);
|
||||
if (!ret)
|
||||
Util.exec(module.show);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue