From d842c8db5ddbb63543f86c125c3feae108b4b9c5 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 17 Oct 2014 04:09:27 -0400 Subject: [PATCH] feature(dom) getCurrentFileByName -> getCurrentByName --- lib/client.js | 6 +++--- lib/client/dom.js | 12 ++++++------ lib/client/key.js | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/client.js b/lib/client.js index 95c51353..e4ad0486 100644 --- a/lib/client.js +++ b/lib/client.js @@ -77,7 +77,7 @@ var Util, DOM, CloudFunc, join; var rootDir; /* убираем слэш с имени каталога */ dirName = Util.rmStr(dirName, '/'); - rootDir = DOM.getCurrentFileByName(dirName); + rootDir = DOM.getCurrentByName(dirName); if (rootDir) DOM.setCurrentFile(rootDir); @@ -185,7 +185,7 @@ var Util, DOM, CloudFunc, join; module = Util.getStrBigFirst(module); file = query[1]; - current = DOM.getCurrentFileByName(file); + current = DOM.getCurrentByName(file); if (file && !current) { msg = CloudFunc.formatMsg('set current file', file, 'error'); @@ -401,7 +401,7 @@ var Util, DOM, CloudFunc, join; } }); - current = DOM.getCurrentFileByName(name); + current = DOM.getCurrentByName(name); if (!current) /* .. */ current = DOM.getFiles(panel)[0]; diff --git a/lib/client/dom.js b/lib/client/dom.js index 974c9cd7..6cb6ded0 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -408,7 +408,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; var func = function(name) { return function() { CloudCmd.refresh(null, function() { - var current = DOM.getCurrentFileByName(name); + var current = DOM.getCurrentByName(name); DOM.setCurrentFile(current); }); }; @@ -475,7 +475,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; if (name) RESTful.write(path, function() { CloudCmd.refresh(null, function() { - var current = DOM.getCurrentFileByName(name); + var current = DOM.getCurrentByName(name); DOM.setCurrentFile(current); }); @@ -512,7 +512,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; if (name && name !== '..') op(fileFrom, function() { CloudCmd.refresh(null, function() { - var byName = DOM.getCurrentFileByName, + var byName = DOM.getCurrentByName, dir = byName(nameDir), file = byName(nameFile); @@ -689,7 +689,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * * @currentFile */ - this.getCurrentFile = function() { + this.getCurrentFile = function() { var ret = this.getByClass(CURRENT_FILE); return ret; @@ -698,7 +698,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; /** * get current file by name */ - this.getCurrentFileByName = function(name) { + this.getCurrentByName = function(name) { var element, panel = CurrentInfo.panel; @@ -1608,7 +1608,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; var panel = DOM.getPanel(), panelPassive = DOM.getPanel(true), setCurrent = function() { - var current = DOM.getCurrentFileByName(name); + var current = DOM.getCurrentByName(name); DOM.setCurrentFile(current); } diff --git a/lib/client/key.js b/lib/client/key.js index b12cccc3..8f41cf63 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -165,7 +165,7 @@ var CloudCmd, Util, DOM; isMatch = name.match(regExp); if (isMatch) { - byName = DOM.getCurrentFileByName(name); + byName = DOM.getCurrentByName(name); if (!skipCount) { setted = true;