From 348bcddebeb15dc62af71b200ffb2e57b2943035 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Feb 2013 04:50:51 -0500 Subject: [PATCH] added ability to remove /fs/no-js when go up to root directory --- ChangeLog | 3 +++ lib/client.js | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 635d7965..9ec6842c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -133,6 +133,9 @@ time was changed. * Added ability show context menu on right click while menu is showing now. +* Added ability to remove /fs/no-js when go up to root +directory. + 2012.12.12, Version 0.1.8 diff --git a/lib/client.js b/lib/client.js index bd153f79..0e6d99ea 100644 --- a/lib/client.js +++ b/lib/client.js @@ -528,19 +528,22 @@ CloudCmd._changeLinks = function(pPanelID){ */ CloudCmd._ajaxLoad = function(pPath, pOptions){ if(!pOptions) - pOptions = {}; + pOptions = {}; /* Отображаем красивые пути */ - var lFSPath = decodeURI(pPath); + var lFSPath = decodeURI(pPath); - lFSPath = Util.removeStr( lFSPath, CloudFunc.NOJS ); + lFSPath = Util.removeStr( lFSPath, CloudFunc.NOJS ); var lCleanPath = Util.removeStr(lFSPath, CloudFunc.FS); Util.log ('reading dir: "' + lCleanPath + '";'); - if(!pOptions.nohistory) - DOM.setHistory(pPath, null, pPath); - DOM.setTitle( CloudFunc.getTitle(pPath) ); + if(!pOptions.nohistory){ + pPath = lCleanPath === '/' ? '/' : pPath; + DOM.setHistory(pPath, null, pPath); + } + + DOM.setTitle( CloudFunc.getTitle(lCleanPath) ); /* если доступен localStorage и * в нём есть нужная нам директория -