diff --git a/lib/client/view.js b/lib/client/view.js index 9d605712..849b4184 100644 --- a/lib/client/view.js +++ b/lib/client/view.js @@ -75,7 +75,7 @@ var CloudCmd, Util, DOM, CloudFunc, $; * function shows FancyBox */ function show(pData, pCallBack, pConfig) { - var lPath, lElement, lAfterFunc, lFunc, name, + var lPath, lElement, lAfterFunc, lFunc, name, isImage, config = {}; if (!Loading) { @@ -98,9 +98,10 @@ var CloudCmd, Util, DOM, CloudFunc, $; $.fancybox(lElement, config); } else { - lPath = CloudFunc.FS + Info.path; + lPath = CloudFunc.FS + Info.path; + isImage = $.fancybox.isImage(lPath); - if (Util.checkExtension(lPath, ['png','jpg', 'gif','ico'])) { + if (isImage) { $.fancybox.open({ href : lPath }, Config); } else Info.getData(function(pParams) {