fix(view) show switch: path -> type

This commit is contained in:
coderaiser 2014-05-20 04:19:10 -04:00
parent 28d5945b98
commit c952992462

View file

@ -105,7 +105,17 @@ var CloudCmd, Util, DOM, CloudFunc, $;
path = CloudFunc.FS + Info.path;
type = getType(path);
switch(path) {
switch(type) {
default:
Info.getData(function(data) {
var element = document.createTextNode(data);
/* add margin only for view text documents */
Element.css('margin', '2%');
$.fancybox(Element.append(element), Config);
});
break;
case 'image':
config = Util.copyObj({
autoSize : true
@ -136,16 +146,6 @@ var CloudCmd, Util, DOM, CloudFunc, $;
});
});
break;
default:
Info.getData(function(data) {
var element = document.createTextNode(data);
/* add margin only for view text documents */
Element.css('margin', '2%');
$.fancybox(Element.append(element), Config);
});
break;
}
}
}