diff --git a/HELP.md b/HELP.md index c41ae39e..0f2d9bdc 100644 --- a/HELP.md +++ b/HELP.md @@ -203,7 +203,7 @@ Right mouse click button shows context menu with items: - Edit - Rename - Copy -- Move +- Cut - Paste - Delete - Zip file diff --git a/lib/client/buffer.js b/lib/client/buffer.js index 3de9ad67..0f029e1b 100644 --- a/lib/client/buffer.js +++ b/lib/client/buffer.js @@ -11,7 +11,7 @@ var Util, DOM; Info = DOM.CurrentInfo, COPY = 'copy', - MOVE = 'move'; + CUT = 'cut'; function getNames() { var name = Info.name, @@ -26,20 +26,20 @@ var Util, DOM; names = getNames(), from = Info.dirPath; - Storage.remove(MOVE) + Storage.remove(CUT) .set(COPY, { from : from, names: names }); }; - this.move = function() { + this.cut = function() { var Storage = DOM.Storage, names = getNames(), from = Info.dirPath; Storage.remove(COPY) - .set(MOVE, { + .set(CUT, { from : from, names: names }); @@ -47,30 +47,30 @@ var Util, DOM; this.paste = function() { var copy = Storage.get.bind(Storage, COPY), - move = Storage.get.bind(Storage, MOVE); + cut = Storage.get.bind(Storage, CUT); - Util.exec.parallel([copy, move], function(error, cp, mv) { + Util.exec.parallel([copy, cut], function(error, cp, ct) { var data = {}, msg = 'Path is same!', path = Info.dirPath; - if (!error && !cp && !mv) + if (!error && !cp && !ct) error = 'No files selected!'; if (error) { DOM.Dialog.alert(error); } else if (cp) { - data = Util.parseJSON(cp); - data.to = path; + data = Util.parseJSON(cp); + data.to = path; if (data.from === path) Dialog.alert(msg); else DOM.copyFiles(data); - } else if (mv) { - data = Util.parseJSON(mv); - data.to = path; + } else if (ct) { + data = Util.parseJSON(ct); + data.to = path; if (data.from === path) Dialog.alert(msg); @@ -79,7 +79,7 @@ var Util, DOM; } Storage.remove(COPY) - .remove(MOVE); + .remove(CUT); }); }; } diff --git a/lib/client/key.js b/lib/client/key.js index 9a4ad2ca..7fed3a50 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -429,7 +429,7 @@ var CloudCmd, Util, DOM; case Key.X: if (ctrl) - Buffer.move(); + Buffer.cut(); break; case Key.V: diff --git a/lib/client/menu.js b/lib/client/menu.js index c838436b..ce0eca8f 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -141,7 +141,7 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO; setTimeout(DOM.renameCurrent, 100); }, 'Copy' : Buffer.copy, - 'Move' : Buffer.move, + 'Cut' : Buffer.cut, 'Paste' : Buffer.paste, 'Delete' : DOM.promptDelete, 'Zip file' : DOM.zipFile,