From 8b692e0e889fdd7323ca0595778d5d2f411e8de5 Mon Sep 17 00:00:00 2001 From: Brian McMichael Date: Fri, 26 Feb 2016 11:30:05 -0500 Subject: [PATCH] fix(view) showImage: prefix --- lib/client/view.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/client/view.js b/lib/client/view.js index e1c10e4d..db4f547b 100644 --- a/lib/client/view.js +++ b/lib/client/view.js @@ -90,7 +90,8 @@ var CloudCmd, Util, DOM, CloudFunc, $; */ function show(data, options) { var path, element, type, - config = {}; + prefixUrl = CloudCmd.PREFIX + CloudFunc.apiURL + CloudFunc.FS, + config = {}; if (!Loading) { Element = $('
'); @@ -122,7 +123,7 @@ var CloudCmd, Util, DOM, CloudFunc, $; } else { Images.show.load(); - path = CloudFunc.FS + Info.path; + path = prefixUrl + Info.path; type = getType(path); switch(type) { @@ -181,23 +182,24 @@ var CloudCmd, Util, DOM, CloudFunc, $; $.fancybox.close(); } - function showImage() { + function showImage(path) { var config, - current = Info.name, - files = [].slice.call(Info.files), - names = DOM.getFilenames(files) + prefixUrl = CloudCmd.PREFIX + CloudFunc.apiURL + CloudFunc.FS, + current = Info.name, + files = [].slice.call(Info.files), + names = DOM.getFilenames(files) .filter(isImage) .filter(function(name) { return name !== current; }).map(function(name) { return { - href: name, + href: prefixUrl + name, title: name }; }); names.unshift({ - href: current, + href: path, title: current });