Make format submenu use 'Original' for original MathML source, and set the value each time the menu is opened, so mixed pages work properly
This commit is contained in:
parent
5ef4eb10d0
commit
a90fbc083a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@
|
|||
|
||||
var CONFIG = HUB.Insert({
|
||||
delay: 150, // the delay for submenus
|
||||
helpURL: "http://www.mathjax.org/help/user/", // the URL for the "MathJax Help" menu
|
||||
helpURL: "http://www.mathjax.org/Help-User/", // the URL for the "MathJax Help" menu
|
||||
|
||||
showRenderer: true, // show the "Math Renderer" menu?
|
||||
showFontMenu: false, // show the "Font Preference" menu?
|
||||
|
@ -672,7 +672,7 @@
|
|||
*/
|
||||
CONFIG.settings = HUB.config.menuSettings;
|
||||
if (!CONFIG.settings.format)
|
||||
{CONFIG.settings.format = (MathJax.InputJax.TeX ? "TeX" : "MathML")}
|
||||
{CONFIG.settings.format = (MathJax.InputJax.TeX ? "Original" : "MathML")}
|
||||
if (typeof(CONFIG.settings.showRenderer) !== "undefined") {CONFIG.showRenderer = CONFIG.settings.showRenderer}
|
||||
if (typeof(CONFIG.settings.showFontMenu) !== "undefined") {CONFIG.showFontMenu = CONFIG.settings.showFontMenu}
|
||||
if (typeof(CONFIG.settings.showContext) !== "undefined") {CONFIG.showContext = CONFIG.settings.showContext}
|
||||
|
@ -685,7 +685,7 @@
|
|||
ITEM.COMMAND("Show Source",MENU.ShowSource),
|
||||
ITEM.SUBMENU("Format",
|
||||
ITEM.RADIO("MathML", "format"),
|
||||
ITEM.RADIO("TeX", "format", {disabled: !MathJax.InputJax.TeX})
|
||||
ITEM.RADIO("Original", "format", {value: "Original"})
|
||||
),
|
||||
ITEM.RULE(),
|
||||
ITEM.SUBMENU("Settings",
|
||||
|
|
|
@ -386,10 +386,13 @@
|
|||
ContextMenu: function (event,force) {
|
||||
if (HTMLCSS.config.showMathMenu && (HTMLCSS.settings.context === "MathJax" || force)) {
|
||||
if (HTMLCSS.safariContextMenuBug) {setTimeout('window.getSelection().empty()',0)}
|
||||
if (MathJax.Menu) {
|
||||
var MENU = MathJax.Menu;
|
||||
if (MENU) {
|
||||
var math = (this.parentNode.className === "MathJax_Display" ? this.parentNode : this)
|
||||
MathJax.Menu.jax = HUB.getJaxFor(math.nextSibling);
|
||||
return MathJax.Menu.menu.Post(event);
|
||||
MENU.jax = HUB.getJaxFor(math.nextSibling);
|
||||
MENU.menu.items[1].menu.items[1].name =
|
||||
(MENU.jax.inputJax.name === "MathML" ? "Original" : MENU.jax.inputJax.name);
|
||||
return MENU.menu.Post(event);
|
||||
} else {
|
||||
if (!AJAX.loadingMathMenu) {
|
||||
AJAX.loadingMathMenu = true;
|
||||
|
|
|
@ -149,12 +149,15 @@
|
|||
ContextMenu: function (event,force) {
|
||||
if (nMML.config.showMathMenu && (nMML.settings.context === "MathJax" || force)) {
|
||||
if (nMML.safariContextMenuBug) {setTimeout('window.getSelection().empty()',0)}
|
||||
if (MathJax.Menu) {
|
||||
var MENU = MathJax.Menu;
|
||||
if (MENU) {
|
||||
if (document.selection) {setTimeout("document.selection.empty()",0)}
|
||||
var script = (isMSIE ? this.parentNode.parentNode.nextSibling : this.parentNode.nextSibling);
|
||||
MathJax.Menu.jax = HUB.getJaxFor(script);
|
||||
MENU.jax = HUB.getJaxFor(script);
|
||||
MENU.menu.items[1].menu.items[1].name =
|
||||
(MENU.jax.inputJax.name === "MathML" ? "Original" : MENU.jax.inputJax.name);
|
||||
delete nMML.trapClick; delete nMML.trapUp;
|
||||
return MathJax.Menu.menu.Post(event);
|
||||
return MENU.menu.Post(event);
|
||||
} else {
|
||||
if (!AJAX.loadingMathMenu) {
|
||||
AJAX.loadingMathMenu = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user