1100: code clean up

This commit is contained in:
Peter Krautzberger 2015-03-19 20:54:30 +01:00
parent df17921e8b
commit 2abf1649ee
3 changed files with 32 additions and 32 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -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
@ -34,7 +31,6 @@
var MENU = MathJax.Menu;
var CONFIG = HUB.CombineConfig("HelpDialog",{
// closeImg: AJAX.urlRev(OUTPUT.imageDir+"/CloseX-31.png"), // image for close "X" for mobiles
styles: {
"#MathJax_Help": {
@ -61,6 +57,14 @@
overflow:"auto", "text-align":"left", "font-size":"80%",
padding:".4em .6em", border:"1px inset", margin:"1em 0px",
"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"]],
// ["img", {
// src: CONFIG.closeImg,
// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
// onclick: HELP.Remove
// }]
["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: HELP.Remove},["\u00D7"]]
["span",{
className: "MathJax_Menu_Close",
onclick: HELP.Remove},
["\u00D7"]
]
]));
LOCALE.setCSS(help);
var doc = (document.documentElement||{});

View File

@ -48,7 +48,6 @@
var CONFIG = HUB.CombineConfig("MathMenu",{
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?
showMathPlayer: true, // show the "MathPlayer" menu?
@ -161,8 +160,17 @@
".MathJax_Menu_Close": {
position:"absolute",
width: "31px", height: "31px",
top:"-15px", left:"-15px"
width:"21px", height:"21px",
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)}
if (MENU.isMobile) {
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
},[
// ["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"]
]);
},"\u00D7"
);
}
div.appendChild(menu);
@ -376,13 +382,6 @@
saveCookie: function () {HTML.Cookie.Set("menu",this.cookie)},
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"
}},jax],["br"],["br"],
["a",{href:"http://www.mathjax.org/"},["www.mathjax.org"]],
// ["img", {
// src: CONFIG.closeImg,
// style: {width:"21px", height:"21px", position:"absolute", top:".2em", right:".2em"},
// onclick: MENU.About.Remove
// }]
["span",{style:{width:"21px", height:"21px", "font-weight": "bold", "font-size": "1.33em", position:"absolute", top:".2em", right:".2em"}, onclick: MENU.About.Remove},"\u00D7"]
["span",{
className: "MathJax_Menu_Close",
onclick: MENU.About.Remove},
"\u00D7"
]
]);
MathJax.Localization.setCSS(about);
var doc = (document.documentElement||{});
@ -1195,7 +1193,6 @@
CALLBACK.Queue(
HUB.Register.StartupHook("End Config",{}), // wait until config is complete
// ["getImages",MENU],
["Styles",AJAX,CONFIG.styles],
["Post",HUB.Startup.signal,"MathMenu Ready"],
["loadComplete",AJAX,"[MathJax]/extensions/MathMenu.js"]