mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(key) <shift> + <f7> - add new file
This commit is contained in:
parent
b86fa21803
commit
c8d7f88e37
3 changed files with 12 additions and 4 deletions
1
HELP.md
1
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue