From c6661cd872c17e146a330e866b4f91bfc9bb0b11 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 14 Aug 2012 16:07:35 +0300 Subject: [PATCH] Update lib/client/menu.js --- lib/client/menu.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/client/menu.js b/lib/client/menu.js index 907be1c2..cccb9605 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -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); }); \ No newline at end of file