From 1f6148ef794f32adae3889139f58cc133ab31148 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 23 Dec 2013 14:42:20 +0000 Subject: [PATCH] refactor(cloudfunc) removeLastSlash - > rmLastSlash --- lib/client.js | 4 ++-- lib/client/dom.js | 4 ++-- lib/cloudfunc.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/client.js b/lib/client.js index f55583d8..7233d560 100644 --- a/lib/client.js +++ b/lib/client.js @@ -246,7 +246,7 @@ var Util, DOM, CloudFunc, CloudCmd; /* Устанавливаем кэш корневого каталога */ var lDirPath = DOM.getCurrentDirPath(); - lDirPath = CloudFunc.removeLastSlash(lDirPath) || '/'; + lDirPath = CloudFunc.rmLastSlash(lDirPath) || '/'; if (!Storage.get(lDirPath)) Storage.set(lDirPath, getJSONfromFileTable()); @@ -304,7 +304,7 @@ var Util, DOM, CloudFunc, CloudCmd; lPanel = pCurrent && pCurrent.parentElement, lPath = DOM.getCurrentDirPath(lPanel), lLink = CloudFunc.FS + lPath, - lNotSlashlLink = CloudFunc.removeLastSlash(lLink), + lNotSlashlLink = CloudFunc.rmLastSlash(lLink), lLoad = CloudCmd.loadDir(lNotSlashlLink, lNEEDREFRESH); lLoad(); diff --git a/lib/client/dom.js b/lib/client/dom.js index 63c52913..40f90a34 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -1257,7 +1257,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; else DOM.deleteCurrent(lCurrent); - var lDir = CloudFunc.removeLastSlash( + var lDir = CloudFunc.rmLastSlash( DOM.getCurrentDirPath() ); @@ -1283,7 +1283,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; lHref = lHref[0].textContent; - lHref = CloudFunc.removeLastSlash(lHref); + lHref = CloudFunc.rmLastSlash(lHref); lSubstr = lHref.substr(lHref , lHref.lastIndexOf('/')); lRet = Util.removeStrOneTime(lHref, lSubstr + '/') || '/'; diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js index e18322de..1739a33f 100644 --- a/lib/cloudfunc.js +++ b/lib/cloudfunc.js @@ -85,7 +85,7 @@ var Util; * Функция убирает последний слеш, * если он - последний символ строки */ - this.removeLastSlash = function(pPath) { + this.rmLastSlash = function(pPath) { var lRet = pPath, lIsStr = typeof pPath==='string', lLengh = pPath.length-1, @@ -349,7 +349,7 @@ var Util; * с пути для кнопки обновить страницу * если он есть */ - lRefreshPath = CloudFunc.removeLastSlash(lPath), + lRefreshPath = CloudFunc.rmLastSlash(lPath), lFileTable = Util.render(pPathTemplate, { link: FS + lRefreshPath,