refactor(client) ajaxLoad: rm noJSONPath

This commit is contained in:
coderaiser 2014-05-22 06:19:32 -04:00
parent 82b1a18955
commit 3e0b2737bf

View file

@ -52,8 +52,6 @@ var Util, DOM, CloudFunc;
else
link = Util.rmStr(href, CloudCmd.HOST);
link += '?json';
if (link || currentLink.target !== '_blank') {
if (panel && panel !== Info.panel) {
DOM.changePanel();
@ -371,15 +369,11 @@ var Util, DOM, CloudFunc;
this.ajaxLoad = function(path, options, panel) {
var SLASH = '/',
fsPath = decodeURI(path),
noJSONPath = Util.rmStr(fsPath, '?json' ),
cleanPath = Util.rmStrOnce(noJSONPath, CloudFunc.FS) || SLASH;
cleanPath = Util.rmStrOnce(fsPath, CloudFunc.FS) || SLASH;
if (!options)
options = {};
if (cleanPath === SLASH)
noJSONPath = SLASH;
Util.log ('reading dir: "' + cleanPath + '";');
Storage.get(cleanPath, function(json) {