Update lib/client/menu.js

This commit is contained in:
coderaiser 2012-08-14 16:07:35 +03:00
parent 3d316e7225
commit c6661cd872

View file

@ -108,15 +108,18 @@ CloudCommander.Menu.Keys = (function(){
/* showing context menu preview*/
CloudCommander.Menu.show();
});
CloudCommander.Menu.load(this);
var lThis = this;
document.onmousedown = function(){
var lTag = event.target.nodeName;
if(event.button === CloudCommander.MOUSE_BUTTON.RIGHT &&
lTag === 'SPAN' ||
lTag === 'A')
CloudCommander.Menu.show();
if(lTag === 'SPAN')
lThis.setCurrentFile(event.target.parentElement.parentElement)
else if(lTag === 'A')
lThis.setCurrentFile(event.target.parentElement)
CloudCommander.Menu.show();
};
CloudCommander.Menu.load(this);
});