From c952992462cda2d977a50c796bf8bf73401ee44e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 20 May 2014 04:19:10 -0400 Subject: [PATCH] fix(view) show switch: path -> type --- lib/client/view.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/client/view.js b/lib/client/view.js index e64759b7..dd08dfd4 100644 --- a/lib/client/view.js +++ b/lib/client/view.js @@ -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; } } }