refactor(view) view, afterShow

This commit is contained in:
coderaiser 2014-01-27 06:21:37 -05:00
parent 544e453364
commit 714647d3a5

View file

@ -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);
};