diff --git a/lib/client/menu.js b/lib/client/menu.js index 1fe53fcd..0ac4b554 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -43,18 +43,18 @@ CloudCommander.Menu.getConfig = (function(){ }; }); -/* function loads css and js of FancyBox +/* function loads css and js of Menu * @pParent - this - * @pCallBack - executes, when everything loaded + * @pPosition - position of menu */ -CloudCommander.Menu.load = (function(pParent){ +CloudCommander.Menu.load = (function(pParent, pPosition){ return function(){ var ljsLoad_f = function(){ var lUISrc = pParent.dir + 'jquery.ui.position.js'; var lMenuSrc = pParent.dir + 'jquery.contextMenu.js'; pParent.jsload(lUISrc, function(){ - pParent.jsload(lMenuSrc, pParent.show(pParent)); + pParent.jsload(lMenuSrc, pParent.show(pParent, pPosition)); }); }; @@ -77,11 +77,11 @@ CloudCommander.Menu.set = (function(){ }); CloudCommander.Menu.seted = false; -CloudCommander.Menu.show = (function(pParent){ +CloudCommander.Menu.show = (function(pParent, pPosition){ return function(){ pParent.set(); - $('li').contextMenu(pParent.x, pParent.y); + $('li').contextMenu(pPosition.x, pPosition.y); } }); @@ -136,5 +136,5 @@ CloudCommander.Menu.Keys = (function(){ CloudCommander.Menu.show(); }; - CloudCommander.Menu.load(this); + CloudCommander.Menu.load(this, pPosition); }); \ No newline at end of file