refactor(cloudfunc) removeLastSlash - > rmLastSlash

This commit is contained in:
coderaiser 2013-12-23 14:42:20 +00:00
parent d15c3d9be3
commit 1f6148ef79
3 changed files with 6 additions and 6 deletions

View file

@ -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();

View file

@ -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 + '/') || '/';

View file

@ -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,