refactor(view) add showImage

This commit is contained in:
coderaiser 2015-07-06 08:13:54 -04:00
parent 11d9e1fef2
commit 70c6d2b970

View file

@ -145,12 +145,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
break;
case 'image':
config = Util.copyObj({
autoSize : true,
type : 'image'
}, Config);
$.fancybox.open(path, config);
showImage(path);
break;
case 'media':
@ -189,6 +184,20 @@ var CloudCmd, Util, DOM, CloudFunc, $;
$.fancybox.close();
}
function showImage(path) {
var config;
config = Util.copyObj({
}, Config);
config = Util.copyObj(config, {
autoSize : true,
type : 'image'
});
$.fancybox.open(path, config);
}
function isImage(name) {
var isMatch;