mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
minor changes
This commit is contained in:
parent
b62fa33927
commit
6377058ef0
1 changed files with 10 additions and 10 deletions
|
|
@ -1,4 +1,4 @@
|
|||
var CloudCommander, CloudFunc, $;
|
||||
var CloudCommander, $;
|
||||
/* object contains jQuery-contextMenu
|
||||
* https://github.com/medialize/jQuery-contextMenu
|
||||
*/
|
||||
|
|
@ -23,7 +23,7 @@ CloudCommander.Menu.getConfig = (function(){
|
|||
else{
|
||||
var lViewer = CloudCommander.Viewer.get();
|
||||
if(lViewer && lViewer.show)
|
||||
lViewer.show()
|
||||
lViewer.show();
|
||||
}
|
||||
}},
|
||||
edit: {name: "Edit", callback: function(key, opt){
|
||||
|
|
@ -32,7 +32,7 @@ CloudCommander.Menu.getConfig = (function(){
|
|||
else{
|
||||
var lEditor = CloudCommander.Editor.get();
|
||||
if(lEditor && lEditor.show)
|
||||
lEditor.show()
|
||||
lEditor.show();
|
||||
}
|
||||
|
||||
}}
|
||||
|
|
@ -86,8 +86,8 @@ CloudCommander.Menu.set = (function(){
|
|||
* DOM tree
|
||||
*/
|
||||
document.onclick = function(pEvent){
|
||||
if(pEvent.x && pEvent.y){
|
||||
var lLayer = lThis.getById('context-menu-layer')
|
||||
if(pEvent && pEvent.x && pEvent.y){
|
||||
var lLayer = lThis.getById('context-menu-layer');
|
||||
var lStyle;
|
||||
|
||||
if(lLayer)
|
||||
|
|
@ -95,10 +95,10 @@ CloudCommander.Menu.set = (function(){
|
|||
/* hide invisible menu layer */
|
||||
if(lStyle)
|
||||
lLayer.style.cssText = lStyle
|
||||
.replace('z-index: 1', 'z-index:-1')
|
||||
.replace('z-index: 1', 'z-index:-1');
|
||||
|
||||
/* get element by point */
|
||||
var lElement = document.elementFromPoint(pEvent.x, pEvent.y)
|
||||
var lElement = document.elementFromPoint(pEvent.x, pEvent.y);
|
||||
var lTag = lElement.tagName;
|
||||
var lParent;
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ CloudCommander.Menu.set = (function(){
|
|||
if(typeof lFunc_f === 'function')
|
||||
lFunc_f();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.seted = true;
|
||||
}
|
||||
|
|
@ -137,10 +137,10 @@ CloudCommander.Menu.show = (function(pParent, pPosition){
|
|||
pParent.set();
|
||||
|
||||
if(pPosition && pPosition.x && pPosition.y)
|
||||
$('li').contextMenu(pPosition)
|
||||
$('li').contextMenu(pPosition);
|
||||
else
|
||||
$('li').contextMenu();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
/* key binding function */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue