diff --git a/lib/client/view.js b/lib/client/view.js index a893c735..d68b2ca0 100644 --- a/lib/client/view.js +++ b/lib/client/view.js @@ -18,8 +18,8 @@ var CloudCmd, Util, DOM, CloudFunc, $; beforeShow : function() { Images.hideLoad(); Key.unsetBind(); + addOverLayClick(); }, - afterShow : onAfterShow, beforeClose : Key.setBind, fitToView : true, loop : false, @@ -95,9 +95,11 @@ var CloudCmd, Util, DOM, CloudFunc, $; } else if (isMusic(path)) getMusicElement(path, function(element) { $.fancybox.open(element, { - beforeShow : musicBeforeShow, - afterShow : onAfterShow, - beforeClose : Key.setBind, + beforeShow : function() { + Config.beforeShow(); + musicBeforeShow(); + }, + beforeClose : Config.beforeClose }); }); else @@ -217,7 +219,7 @@ var CloudCmd, Util, DOM, CloudFunc, $; } - function onAfterShow() { + function addOverLayClick() { var NAME = 'fancybox-overlay', overlay = DOM.getByClass(NAME), onOverLayClick = function() {