mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(view) add contextmenu to overlayclick
This commit is contained in:
parent
52f6705de6
commit
ce5a9f6796
1 changed files with 7 additions and 4 deletions
|
|
@ -59,7 +59,7 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
View.hide = hide;
|
||||
|
||||
function init() {
|
||||
var func = CallBack || Util.exec.with(show, null);
|
||||
var func = CallBack || Util.exec.with(show, null);
|
||||
|
||||
Loading = true;
|
||||
|
||||
|
|
@ -79,7 +79,10 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
className : 'fancybox-overlay fancybox-overlay-fixed'
|
||||
});
|
||||
|
||||
Events.addClick(Util.exec.with(onOverLayClick, Overlay), Overlay);
|
||||
['click', 'contextmenu'].forEach(function(name) {
|
||||
Events.add(name, Overlay, onOverLayClick);
|
||||
});
|
||||
|
||||
Events.addKey(listener);
|
||||
}
|
||||
|
||||
|
|
@ -285,12 +288,12 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
});
|
||||
}
|
||||
|
||||
function onOverLayClick(overlay, event) {
|
||||
function onOverLayClick(event) {
|
||||
var isCurrent, isFiles, isFilesPassive,
|
||||
files = Info.files,
|
||||
filesPassive = Info.filesPassive,
|
||||
element = event.target,
|
||||
isOverlay = element === overlay,
|
||||
isOverlay = element === Overlay,
|
||||
position = {
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue