1100: code clean up
This commit is contained in:
parent
df17921e8b
commit
2abf1649ee
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,6 +1,3 @@
|
||||||
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
|
||||||
/* vim: set ts=2 et sw=2 tw=80: */
|
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/HelpDialog.js
|
* MathJax/extensions/HelpDialog.js
|
||||||
|
@ -34,7 +31,6 @@
|
||||||
var MENU = MathJax.Menu;
|
var MENU = MathJax.Menu;
|
||||||
|
|
||||||
var CONFIG = HUB.CombineConfig("HelpDialog",{
|
var CONFIG = HUB.CombineConfig("HelpDialog",{
|
||||||
// closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
|
|
||||||
|
|
||||||
styles: {
|
styles: {
|
||||||
"#MathJax_Help": {
|
"#MathJax_Help": {
|
||||||
|
@ -61,6 +57,14 @@
|
||||||
overflow:"auto", "text-align":"left", "font-size":"80%",
|
overflow:"auto", "text-align":"left", "font-size":"80%",
|
||||||
padding:".4em .6em", border:"1px inset", margin:"1em 0px",
|
padding:".4em .6em", border:"1px inset", margin:"1em 0px",
|
||||||
"max-height":"20em", "max-width":"30em", "background-color":"#EEEEEE"
|
"max-height":"20em", "max-width":"30em", "background-color":"#EEEEEE"
|
||||||
|
},
|
||||||
|
|
||||||
|
".MathJax_Menu_Close": {
|
||||||
|
position:"absolute",
|
||||||
|
width:"21px", height:"21px",
|
||||||
|
top:".2em", right:".2em",
|
||||||
|
"font-weight": "bold",
|
||||||
|
"font-size": "1.33em"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -122,12 +126,11 @@
|
||||||
]
|
]
|
||||||
]],
|
]],
|
||||||
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
|
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
|
||||||
// ["img", {
|
["span",{
|
||||||
// src: CONFIG.closeImg,
|
className: "MathJax_Menu_Close",
|
||||||
// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
|
onclick: HELP.Remove},
|
||||||
// onclick: HELP.Remove
|
["\u00D7"]
|
||||||
// }]
|
]
|
||||||
["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: HELP.Remove},["\u00D7"]]
|
|
||||||
]));
|
]));
|
||||||
LOCALE.setCSS(help);
|
LOCALE.setCSS(help);
|
||||||
var doc = (document.documentElement||{});
|
var doc = (document.documentElement||{});
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
|
|
||||||
var CONFIG = HUB.CombineConfig("MathMenu",{
|
var CONFIG = HUB.CombineConfig("MathMenu",{
|
||||||
delay: 150, // the delay for submenus
|
delay: 150, // the delay for submenus
|
||||||
// closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
|
|
||||||
|
|
||||||
showRenderer: true, // show the "Math Renderer" menu?
|
showRenderer: true, // show the "Math Renderer" menu?
|
||||||
showMathPlayer: true, // show the "MathPlayer" menu?
|
showMathPlayer: true, // show the "MathPlayer" menu?
|
||||||
|
@ -161,8 +160,17 @@
|
||||||
|
|
||||||
".MathJax_Menu_Close": {
|
".MathJax_Menu_Close": {
|
||||||
position:"absolute",
|
position:"absolute",
|
||||||
width: "31px", height: "31px",
|
width:"21px", height:"21px",
|
||||||
top:"-15px", left:"-15px"
|
top:".2em", right:".2em",
|
||||||
|
"font-weight": "bold",
|
||||||
|
"font-size": "1.33em"
|
||||||
|
},
|
||||||
|
".MathJax_Menu_Mobile_Close": {
|
||||||
|
position:"absolute",
|
||||||
|
width:"1em", height:"1em",
|
||||||
|
top:"0", left:"0",
|
||||||
|
"font-weight": "bold",
|
||||||
|
"font-size": "1.33em"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -210,12 +218,10 @@
|
||||||
for (var i = 0, m = this.items.length; i < m; i++) {this.items[i].Create(menu)}
|
for (var i = 0, m = this.items.length; i < m; i++) {this.items[i].Create(menu)}
|
||||||
if (MENU.isMobile) {
|
if (MENU.isMobile) {
|
||||||
HTML.addElement(menu,"span",{
|
HTML.addElement(menu,"span",{
|
||||||
className: "MathJax_Menu_Close", menu: parent,
|
className: "MathJax_Menu_Mobile_Close", menu: parent,
|
||||||
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close, onmouseup: FALSE
|
ontouchstart: MENU.Close, ontouchend: FALSE, onmousedown: MENU.Close, onmouseup: FALSE
|
||||||
},[
|
},"\u00D7"
|
||||||
// ["img",{src: CONFIG.closeImg, style:{width:"100%",height:"100%"}}]
|
);
|
||||||
["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: MENU.About.Remove},"\u00D7"]
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div.appendChild(menu);
|
div.appendChild(menu);
|
||||||
|
@ -376,13 +382,6 @@
|
||||||
saveCookie: function () {HTML.Cookie.Set("menu",this.cookie)},
|
saveCookie: function () {HTML.Cookie.Set("menu",this.cookie)},
|
||||||
getCookie: function () {this.cookie = HTML.Cookie.Get("menu")}
|
getCookie: function () {this.cookie = HTML.Cookie.Get("menu")}
|
||||||
|
|
||||||
//
|
|
||||||
// Preload images so they show up with the menu
|
|
||||||
//
|
|
||||||
// getImages: function () {
|
|
||||||
// if (MENU.isMobile) {var close = new Image(); close.src = CONFIG.closeImg}
|
|
||||||
// }
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
@ -668,12 +667,11 @@
|
||||||
"background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset"
|
"background-color":"#E4E4E4", padding:".4em .6em", border:"1px inset"
|
||||||
}},jax],["br"],["br"],
|
}},jax],["br"],["br"],
|
||||||
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
|
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
|
||||||
// ["img", {
|
["span",{
|
||||||
// src: CONFIG.closeImg,
|
className: "MathJax_Menu_Close",
|
||||||
// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
|
onclick: MENU.About.Remove},
|
||||||
// onclick: MENU.About.Remove
|
"\u00D7"
|
||||||
// }]
|
]
|
||||||
["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: MENU.About.Remove},"\u00D7"]
|
|
||||||
]);
|
]);
|
||||||
MathJax.Localization.setCSS(about);
|
MathJax.Localization.setCSS(about);
|
||||||
var doc = (document.documentElement||{});
|
var doc = (document.documentElement||{});
|
||||||
|
@ -1195,7 +1193,6 @@
|
||||||
|
|
||||||
CALLBACK.Queue(
|
CALLBACK.Queue(
|
||||||
HUB.Register.StartupHook("End Config",{}), // wait until config is complete
|
HUB.Register.StartupHook("End Config",{}), // wait until config is complete
|
||||||
// ["getImages",MENU],
|
|
||||||
["Styles",AJAX,CONFIG.styles],
|
["Styles",AJAX,CONFIG.styles],
|
||||||
["Post",HUB.Startup.signal,"MathMenu Ready"],
|
["Post",HUB.Startup.signal,"MathMenu Ready"],
|
||||||
["loadComplete",AJAX,"[MathJax]/extensions/MathMenu.js"]
|
["loadComplete",AJAX,"[MathJax]/extensions/MathMenu.js"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user