|
544 | 544 | MENU.FocusNode(menu);
|
545 | 545 | },
|
546 | 546 | Activate: function(event, menu) {
|
547 |
| - var jaxs = MENU.AllNodes(); |
548 |
| - for (var j = 0, jax; jax = jaxs[j]; j++) { |
549 |
| - if (jax.tabIndex > 0) { |
550 |
| - jax.oldTabIndex = jax.tabIndex; |
551 |
| - } |
552 |
| - jax.tabIndex = -1; |
553 |
| - } |
| 547 | + MENU.UnsetTabIndex(); |
554 | 548 | MENU.posted = true;
|
555 | 549 | },
|
556 | 550 | Unfocus: function() {
|
557 | 551 | MENU.ActiveNode().tabIndex = -1;
|
558 |
| - var jaxs = MENU.AllNodes(); |
559 |
| - for (var j = 0, jax; jax = jaxs[j]; j++) { |
560 |
| - if (jax.oldTabIndex !== undefined) { |
561 |
| - jax.tabIndex = jax.oldTabIndex |
562 |
| - delete jax.oldTabIndex; |
563 |
| - } else { |
564 |
| - jax.tabIndex = HUB.getTabOrder(); |
565 |
| - } |
566 |
| - } |
| 552 | + MENU.SetTabIndex(); |
567 | 553 | MENU.FocusNode(MENU.CurrentNode());
|
568 | 554 | MENU.posted = false;
|
569 | 555 | },
|
|
585 | 571 | Left: function(event, menu) {
|
586 | 572 | MENU.MoveHorizontal(event, menu, function(x) {return x - 1;});
|
587 | 573 | },
|
| 574 | + UnsetTabIndex: function () { |
| 575 | + var jaxs = MENU.AllNodes(); |
| 576 | + for (var j = 0, jax; jax = jaxs[j]; j++) { |
| 577 | + if (jax.tabIndex > 0) { |
| 578 | + jax.oldTabIndex = jax.tabIndex; |
| 579 | + } |
| 580 | + jax.tabIndex = -1; |
| 581 | + } |
| 582 | + }, |
| 583 | + SetTabIndex: function () { |
| 584 | + var jaxs = MENU.AllNodes(); |
| 585 | + for (var j = 0, jax; jax = jaxs[j]; j++) { |
| 586 | + if (jax.oldTabIndex !== undefined) { |
| 587 | + jax.tabIndex = jax.oldTabIndex |
| 588 | + delete jax.oldTabIndex; |
| 589 | + } else { |
| 590 | + jax.tabIndex = HUB.getTabOrder(); |
| 591 | + } |
| 592 | + } |
| 593 | + }, |
588 | 594 |
|
589 | 595 | //TODO: Move to utility class.
|
590 | 596 | // Computes a mod n.
|
|
1336 | 1342 | }
|
1337 | 1343 | };
|
1338 | 1344 |
|
| 1345 | + /* |
| 1346 | + * Toggle assistive MML settings |
| 1347 | + */ |
1339 | 1348 | MENU.AssistiveMML = function (item,restart) {
|
1340 | 1349 | var AMML = MathJax.Extension.AssistiveMML;
|
1341 | 1350 | if (!AMML) {
|
|
1543 | 1552 | ITEM.RULE(),
|
1544 | 1553 | ITEM.CHECKBOX("Fast Preview", "FastPreview"),
|
1545 | 1554 | ITEM.CHECKBOX("Assistive MathML", "assistiveMML", {action:MENU.AssistiveMML}),
|
1546 |
| - ITEM.CHECKBOX("Include in Tab Order", "inTabOrder", {action:CONFIG.inTabOrder}) |
| 1555 | + ITEM.CHECKBOX("Include in Tab Order", "inTabOrder") |
1547 | 1556 | ),
|
1548 | 1557 | ITEM.SUBMENU("MathPlayer", {hidden:!HUB.Browser.isMSIE || !CONFIG.showMathPlayer,
|
1549 | 1558 | disabled:!HUB.Browser.hasMathPlayer},
|
|
0 commit comments