instiki/public/MathJax/extensions/MathMenu.js

19 lines
14 KiB
JavaScript
Raw Normal View History

/*
* ../SourceForge/trunk/mathjax/extensions/MathMenu.js
*
* Copyright (c) 2010 Design Science, Inc.
*
* Part of the MathJax library.
* See http://www.mathjax.org for details.
*
* Licensed under the Apache License, Version 2.0;
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.Unpack([
['(','function(','b,c,f','){var ','k="1.0.1";var i=','b.Browser.','isPC,g=',5,'isMSIE;var e=(i?null:"5px");var j=b.Insert({delay:150,helpURL',':"http://www.mathjax.org','/help/user/",','showRenderer',':true,','showFontMenu',':false,','showContext',14,'windowSettings',':{status:"no",toolbar:"no",locationbar:"no",menubar:"no",directories:"no",personalbar:"no",resizable:"yes",scrollbars:"yes",width:100,height:50},styles:{".','MathJax_Menu','":{','position:"absolute','","','background-color','":"white",color:"black",width:"auto",','padding:(i?"2px','":"5px 0px"),border:"','1px solid #CCCCCC','",margin:0,','cursor:"default','",font:"menu","','text-align":"','left","text-indent":0,"text-transform','":"none","','line-height','":"normal","','letter-','spacing":"normal","word-',37,'wrap',35,'white-space":"nowrap","float',33,'z-index":','201,"','border-radius":e',',"-webkit-',45,',"-moz-',45,',"-khtml-',45,',"box-shadow":"0px 10px 20px #808080","-webkit-box-shadow":"0px 10px 20px #808080","-moz-box-shadow":"0px 10px 20px #808080","-khtml-box-shadow":"0px 10px 20px #808080",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color=\'gray\', Positive=\'true','\')"},".','MathJax_MenuItem','":{',25,' 2em":"1px 2em"),background:"transparent','"},".','MathJax_MenuTitle','":{"',23,'":"#CCCCCC",margin:(i?"-1px -1px 1px -1px":"-5px 0 0 0"),"',31,'center","','font-style":"italic','","font-size":"','80%",color:"#444444",padding:"2px 0",overflow:"hidden',58,'MathJax_MenuArrow','":{',21,'",right:".5em",color:"#666666','","font-family":(g?"\'Arial unicode MS\'":null)},".','MathJax_MenuActive',' .',69,'":{color:"','white',58,'MathJax_MenuCheck','":{',21,'",left:".7em',73,'MathJax_MenuRadioCheck','":{',21,'",left:(i?"1em":".7em")},".','MathJax_MenuLabel','":{',25,' 2em 4px 1.33em":"1px 2em 3px 1.33em"),"',65,58,'MathJax_MenuRule',60,'border-top":(i?"',27,'":"1px solid #DDDDDD"),margin:(i?"4px 1px 0px":"4px 3px")},".','MathJax_MenuDisabled',77,'GrayText',58,74,60,23,'":(i?"Highlight":"#606872"),color:(i?"HighlightText":"white")}}},(b.config.MathMenu||{}));var d=',1,'l){if(!l){l=window.event}if(','l){if(','l.preventDefault','){',111,'()}if(','l.stopPropagation','){',115,'()}l.cancelBubble=true;l.returnValue=false}','return ','false};var a=','MathJax.','Menu','=MathJax.Object.Subclass({','version:k,items:[],posted',14,'title:null,margin:5,Init:',1,'l){this.items=[].','slice.call(arguments,','0)},With:',1,'l){if(l){b.Insert(this,l)}return this},','Post:',1,'n,v','){if(!n){n=window.event}','var t=(!this.title?null:[["div",{','className:"',59,'"},[this.','title]]]);var l','=document.getElementById("MathJax_MenuFrame','");if(!l){l','=a.Background(','this)}var o=c','.addElement(','l',',"div",{','onmouseup:a.Mouseup,','ondblclick',':this.False,ondragstart:this.False,onselectstart:this.False,','oncontextmenu',':this.False,','menuItem',':this,',138,19,'"},t);for(var q=0,p=this.items.length;q<p;q++){this.items[q].Create(o)}this.posted=true;o','.style.width','=(o.','offsetWidth','+2)+"px";var u=n.pageX,s=n.pageY;if(!u&&!s){u=n.clientX+','document.body.','scrollLeft+','document.documentElement','.scrollLeft;s=n.clientY+',163,'scrollTop','+',165,'.',168,'}if(!v){if(u+o.',161,'>',163,161,'-this.margin','){u=',163,161,'-o.',161,178,'}a.skipUp=true}else{var r="left",w=v.',161,';u=v.',161,'-2;s=0;while(v&&v!==l){u+=v.offsetLeft;s+=v.offsetTop;v=v.parentNode}if(u+o.',161,'>',163,161,178,'){r="right";u=Math.max(this.margin,u-w-o.',161,'+6)}if(!i){o.style["borderRadiusTop','"+r]=0;o.style["','WebkitBorderRadiusTop',198,'MozBorderRadiusTop',198,'KhtmlBorderRadiusTop"+r]=0}}o.style.left=u+"px";o.style.top=s+"px";if(','document.selection','&&',204,'.empty){',204,'.empty()}','return this.False(','n)},Remove:',1,'l,m){','var n',142,'");if(n){n.','parentNode.removeChild(','n',');if(this.','msieBackgroundBug','){detachEvent("onresize",a.Resize)}}},Mouseup:',1,213,'if(a.skipUp){','delete ','a.skipUp}else{','this.Remove(l,m',')}},False:d},{config:j,div:null,Remove:',1,'l){a.Event(l,this,"','Remove")},Mouseover:',1,230,'Mouseover")},Mouseout:',1,230,'Mouseou
]);