mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
refactor(cloudfunc) removeLastSlash - > rmLastSlash
This commit is contained in:
parent
d15c3d9be3
commit
1f6148ef79
3 changed files with 6 additions and 6 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 + '/') || '/';
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue