summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/jquery/plugins/contextMenu/contextMenu-min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/jquery/plugins/contextMenu/contextMenu-min.js b/js/jquery/plugins/contextMenu/contextMenu-min.js
index 3f6ce1938..cbcc9146e 100644
--- a/js/jquery/plugins/contextMenu/contextMenu-min.js
+++ b/js/jquery/plugins/contextMenu/contextMenu-min.js
@@ -3,7 +3,7 @@ _cleanData(elems);};}
var
$currentTrigger=null,initialized=false,$win=$(window),counter=0,namespaces={},menus={},types={},defaults={selector:null,appendTo:null,trigger:"right",autoHide:false,delay:200,reposition:true,determinePosition:function($menu){if($.ui&&$.ui.position){$menu.css('display','block').position({my:"center top",at:"center bottom",of:this,offset:"0 5",collision:"fit"}).css('display','none');}else{var offset=this.offset();offset.top+=this.outerHeight();offset.left+=this.outerWidth()/2-$menu.outerWidth()/2;$menu.css(offset);}},position:function(opt,x,y){var $this=this,offset;if(!x&&!y){opt.determinePosition.call(this,opt.$menu);return;}else if(x==="maintain"&&y==="maintain"){offset=opt.$menu.position();}else{offset={top:y,left:x};}
var bottom=$win.scrollTop()+$win.height(),right=$win.scrollLeft()+$win.width(),height=opt.$menu.height(),width=opt.$menu.width();if(offset.top+height>bottom){offset.top-=height;}
-if(offset.left+width>right){offset.left-=width;}
+if(offset.top<0){offset.top=0;}if(offset.left+width>right){offset.left-=width;}if(offset.left<0){offset.left=0;}
opt.$menu.css(offset);},positionSubmenu:function($menu){if($.ui&&$.ui.position){$menu.css('display','block').position({my:"left top",at:"right top",of:this,collision:"flipfit fit"}).css('display','');}else{var offset={top:0,left:this.outerWidth()};$menu.css(offset);}},zIndex:1,animation:{duration:50,show:'slideDown',hide:'slideUp'},events:{show:$.noop,hide:$.noop},callback:null,items:{}},hoveract={timer:null,pageX:null,pageY:null},zindex=function($t){var zin=0,$tt=$t;while(true){zin=Math.max(zin,parseInt($tt.css('z-index'),10)||0);$tt=$tt.parent();if(!$tt||!$tt.length||"html body".indexOf($tt.prop('nodeName').toLowerCase())>-1){break;}}
return zin;},handle={abortevent:function(e){e.preventDefault();e.stopImmediatePropagation();},contextmenu:function(e){var $this=$(this);e.preventDefault();e.stopImmediatePropagation();if(e.data.trigger!='right'&&e.originalEvent){return;}
if($this.hasClass('context-menu-active')){return;}