mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
Update lib/client/menu.js
This commit is contained in:
parent
48e915ed52
commit
315107e002
1 changed files with 10 additions and 0 deletions
|
|
@ -78,6 +78,12 @@ CloudCommander.Menu.set = (function(){
|
|||
var lFunc_f = document.onclick;
|
||||
document.onclick = function(pEvent){
|
||||
if(pEvent.x && pEvent.y){
|
||||
var lLayer = lThis.getById('context-menu-layer')
|
||||
/* hide invisible menu layer */
|
||||
lLayer.style.cssText = lLayer.style.cssText
|
||||
.replace('z-index: 1', 'z-index:-1')
|
||||
|
||||
/* get element by point */
|
||||
var lElement = document.elementFromPoint(pEvent.x, pEvent.y)
|
||||
if (lElement.tagName === 'A')
|
||||
lThis.setCurrentFile(lElement
|
||||
|
|
@ -86,6 +92,10 @@ CloudCommander.Menu.set = (function(){
|
|||
lThis.setCurrentFile(lElement
|
||||
.parentElement);
|
||||
|
||||
/* show invisible menu layer */
|
||||
lLayer.style.cssText = lLayer.style.cssText
|
||||
.replace('z-index: -1', 'z-index: 1')
|
||||
|
||||
if(typeof lFunc_f === 'function')
|
||||
lFunc_f();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue