diff --git a/HELP.md b/HELP.md index 50560887..4d7cc9fb 100644 --- a/HELP.md +++ b/HELP.md @@ -82,6 +82,7 @@ Hot keys - **F5** - copy - **F6** - rename/move - **F7** - new dir +- **F7** + **shift** = new file - **F8, Delete** - remove current file - **F9** - menu - **F10** - config diff --git a/lib/client/dom.js b/lib/client/dom.js index 65ae0249..68d22187 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -704,7 +704,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * */ this.promptNewDir = function() { - Cmd.promptNewFile('directory', '?dir'); + promptNew('directory', '?dir'); }; /** @@ -713,7 +713,11 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * @pTypeName * @pType */ - this.promptNewFile = function(pTypeName, pType) { + this.promptNewFile = function() { + promptNew('file'); + }; + + function promptNew(pTypeName, pType) { var lName = Cmd.getCurrentName(), lDir = Cmd.getCurrentDirPath(), lMsg = 'New ' + pTypeName || 'File', @@ -726,7 +730,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; if (lName) RESTful.save(lDir + lName + lType, null, CloudCmd.refresh); - }; + } /** * zip file diff --git a/lib/client/key.js b/lib/client/key.js index 78b149cd..1709ac5e 100644 --- a/lib/client/key.js +++ b/lib/client/key.js @@ -260,7 +260,10 @@ var CloudCmd, Util, DOM; break; case Key.F7: - DOM.promptNewDir(); + if (shift) + DOM.promptNewFile(); + else + DOM.promptNewDir(); break; case Key.F8: