mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
refactor(view) checkExtension -> isImage
This commit is contained in:
parent
bfcd1cb2c7
commit
9b4d3cd6e7
1 changed files with 4 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue