mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(view) view, afterShow
This commit is contained in:
parent
544e453364
commit
714647d3a5
1 changed files with 9 additions and 6 deletions
|
|
@ -12,7 +12,9 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
Info = DOM.CurrentInfo,
|
||||
Key = CloudCmd.Key,
|
||||
Images = DOM.Images,
|
||||
View = Util.exec,
|
||||
View = function() {
|
||||
Util.exec(arguments);
|
||||
},
|
||||
Element,
|
||||
|
||||
Config = {
|
||||
|
|
@ -20,9 +22,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
Images.hideLoad();
|
||||
Key.unsetBind();
|
||||
},
|
||||
afterShow : function() {
|
||||
Element.focus();
|
||||
},
|
||||
afterShow : afterShow,
|
||||
|
||||
beforeClose : Key.setBind,
|
||||
|
||||
|
|
@ -73,6 +73,10 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
Events.addKey(listener);
|
||||
}
|
||||
|
||||
function afterShow() {
|
||||
Element.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* function shows FancyBox
|
||||
*/
|
||||
|
|
@ -84,9 +88,8 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
Element = $('<div id=view tabindex=0>');
|
||||
if (pData) {
|
||||
lElement = $(Element).append(pData);
|
||||
lAfterFunc = Config.afterShow,
|
||||
lFunc = function() {
|
||||
Util.exec(lAfterFunc);
|
||||
afterShow();
|
||||
Util.exec(pCallBack);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue