From 1d5d87d2a468bd11c04bb358d04525608aa65fe2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 17 Apr 2014 03:37:38 -0400 Subject: [PATCH] refactor(dom) copyCurrent -> copyFiles --- lib/client/dom.js | 7 ++----- lib/client/key.js | 2 +- lib/client/listeners.js | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index 411820d5..bdede769 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -1748,18 +1748,15 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * * @param current */ - this.copyCurrent = function(current) { + this.copyFiles = function() { var n, name, from, to, files, cmp, msg, path = CurrentInfo.dirPath, RESTful = DOM.RESTful, names = Cmd.getSelectedNames(), length = names && names.length; - if (!Cmd.isCurrentFile(current)) - current = Cmd.getCurrentFile(); - if (!length) { - name = Cmd.getCurrentName(current); + name = DOM.getCurrentName(); names.push(name); } else if (length === 1) { name = names[0]; diff --git a/lib/client/key.js b/lib/client/key.js index c51588ae..21b83b93 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -247,7 +247,7 @@ var CloudCmd, Util, DOM; break; case Key.F5: - DOM.copyCurrent(current); + DOM.copyFiles(); DOM.preventDefault(event); break; diff --git a/lib/client/listeners.js b/lib/client/listeners.js index c7a40cf1..4368f651 100644 --- a/lib/client/listeners.js +++ b/lib/client/listeners.js @@ -66,7 +66,7 @@ var Util, DOM, CloudCmd; 'contact' : CloudCmd.Contact.show, 'f2' : DOM.renameCurrent, - 'f5' : DOM.copyCurrent, + 'f5' : DOM.copyFiles, 'f6' : DOM.moveCurrent, 'f7' : DOM.promptNewDir, 'f8' : DOM.promptDelete