mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fix(view) show switch: path -> type
This commit is contained in:
parent
28d5945b98
commit
c952992462
1 changed files with 11 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue