mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
Added ability to delete files (not for real for now) thru keys panel (F8)
This commit is contained in:
parent
13bbbaff9c
commit
18dbff9d22
5 changed files with 30 additions and 15 deletions
|
|
@ -176,6 +176,10 @@ Editor window could not be cloused.
|
|||
|
||||
* Fixed IP on windows.
|
||||
|
||||
* Added ability to delete files (not for real for now)
|
||||
thru keys panel (F8).
|
||||
|
||||
|
||||
2012.10.01, Version 0.1.7
|
||||
|
||||
* Changed name of menu files, fixed npm and jitsu
|
||||
|
|
|
|||
|
|
@ -386,14 +386,14 @@ function initKeysPanel(pCallBack){
|
|||
|
||||
lFuncs =[
|
||||
null,
|
||||
null, /* f1 */
|
||||
null, /* f2 */
|
||||
cloudcmd.Viewer, /* f3 */
|
||||
cloudcmd.Editor, /* f4 */
|
||||
null, /* f5 */
|
||||
null, /* f6 */
|
||||
null, /* f7 */
|
||||
null, /* f8 */
|
||||
null, /* f1 */
|
||||
null, /* f2 */
|
||||
cloudcmd.Viewer, /* f3 */
|
||||
cloudcmd.Editor, /* f4 */
|
||||
null, /* f5 */
|
||||
null, /* f6 */
|
||||
null, /* f7 */
|
||||
DOM.promptRemoveCurrent,/* f8 */
|
||||
];
|
||||
|
||||
for(var i = 1; i <= 8; i++){
|
||||
|
|
|
|||
|
|
@ -270,13 +270,24 @@ var CloudCommander, Util, DOM, CloudFunc;
|
|||
*
|
||||
* @pCurrentFile
|
||||
*/
|
||||
DOM.delete = function(pCurrentFile){
|
||||
var lMsg = 'Are you sure thet you wont delete ',
|
||||
lName = DOM.getCurrentName(pCurrentFile),
|
||||
lRet = confirm(lMsg + lName + '?');
|
||||
DOM.promptRemoveCurrent = function(pCurrentFile){
|
||||
var lRet,
|
||||
lCurrent,
|
||||
lName,
|
||||
lMsg = 'Are you sure thet you wont delete ';
|
||||
|
||||
/* dom element passed and it is not event */
|
||||
if(pCurrentFile && !pCurrentFile.type)
|
||||
lCurrent = pCurrentFile;
|
||||
|
||||
lName = DOM.getCurrentName(lCurrent);
|
||||
|
||||
lRet = confirm(lMsg + lName + '?');
|
||||
|
||||
if(lRet)
|
||||
DOM.removeCurrent(pCurrentFile);
|
||||
DOM.removeCurrent(lCurrent);
|
||||
|
||||
return lRet;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ var CloudCommander, Util, DOM;
|
|||
event.preventDefault();//запрет на дальнейшее действие
|
||||
}
|
||||
else if(lKeyCode === KEY.Delete)
|
||||
DOM.delete(lCurrentFile);
|
||||
DOM.promptRemoveCurrent(lCurrentFile);
|
||||
|
||||
/* if f3 or shift+f3 or alt+f3 pressed */
|
||||
else if(lKeyCode === KEY.F3){
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ var CloudCommander, Util, DOM, CloudFunc, $;
|
|||
|
||||
delete: {name: 'Delete',
|
||||
callback: function(key, opt){
|
||||
DOM.delete();
|
||||
DOM.promptRemoveCurrent();
|
||||
}},
|
||||
|
||||
upload: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue