mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
feature(menu) show alert when try to cut/copy ".."
This commit is contained in:
parent
8bc6a98574
commit
4298137694
1 changed files with 14 additions and 3 deletions
|
|
@ -160,7 +160,7 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO;
|
|||
var show = function(name) {
|
||||
CloudCmd[name].show();
|
||||
},
|
||||
|
||||
Dialog = DOM.Dialog,
|
||||
menuData = getMenuData(is),
|
||||
menu = {
|
||||
'View' : Util.exec.with(show, 'View'),
|
||||
|
|
@ -179,8 +179,12 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO;
|
|||
},
|
||||
'Upload To' : {},
|
||||
'Download' : download,
|
||||
'Cut' : Buffer.cut,
|
||||
'Copy' : Buffer.copy,
|
||||
'Cut' : function() {
|
||||
isCurrent(Buffer.cut, Dialog.alert.noFiles);
|
||||
},
|
||||
'Copy' : function() {
|
||||
isCurrent(Buffer.copy, Dialog.alert.noFiles);
|
||||
},
|
||||
};
|
||||
|
||||
menu['Upload To'] = menuUpload;
|
||||
|
|
@ -192,6 +196,13 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO;
|
|||
});
|
||||
}
|
||||
|
||||
function isCurrent(yesFn, noFn) {
|
||||
if (Info.name !== '..')
|
||||
yesFn();
|
||||
else
|
||||
noFn();
|
||||
}
|
||||
|
||||
function isPath(x, y) {
|
||||
var el, elements, is,
|
||||
panel = Info.panel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue