Add HelpDialog to the list of domains for the three languages, and make sure that the domain file is loaded (even if the language is changed after the help dialog has been viewed in another language).

This commit is contained in:
Davide P. Cervone 2013-04-22 13:27:39 -04:00
parent 3901529db9
commit 7214be5ff1
4 changed files with 11 additions and 5 deletions

View File

@ -24,7 +24,7 @@
* limitations under the License.
*/
(function (HUB,HTML,AJAX,OUTPUT) {
(function (HUB,HTML,AJAX,OUTPUT,LOCALE) {
var HELP = MathJax.Extension.Help = {
version: "2.1"
@ -69,10 +69,14 @@
* Handle the Help Dialog box
*/
HELP.Dialog = function () {
LOCALE.loadDomain("HelpDialog",["Post",HELP]);
};
HELP.Post = function () {
this.div = MENU.Background(this);
var help = HTML.addElement(this.div,"div",{
id: "MathJax_Help"
},MathJax.Localization._("HelpDialog",[
},LOCALE._("HelpDialog",[
["b",{style:{fontSize:"120%"}},[["Help","MathJax Help"]]],
["div",{id: "MathJax_HelpContent"},[
["p",{},[["MathJax",
@ -124,7 +128,7 @@
onclick: HELP.Remove
}]
]));
MathJax.Localization.setCSS(help);
LOCALE.setCSS(help);
var doc = (document.documentElement||{});
var H = window.innerHeight || doc.clientHeight || doc.scrollHeight || 0;
if (MENU.prototype.msieAboutBug) {
@ -143,9 +147,8 @@
MathJax.Callback.Queue(
HUB.Register.StartupHook("End Config",{}), // wait until config is complete
["Styles",AJAX,CONFIG.styles],
["loadDomain",MathJax.Localization,"HelpDialog"],
["Post",HUB.Startup.signal,"HelpDialig Ready"],
["loadComplete",AJAX,"[MathJax]/extensions/HelpDialog.js"]
);
})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax);
})(MathJax.Hub,MathJax.HTML,MathJax.Ajax,MathJax.OutputJax,MathJax.Localization);

View File

@ -59,6 +59,7 @@ MathJax.Localization.addTranslation("de",null,{
MathMenu: {},
FontWarnings: {},
HelpDialog: {},
"v1.0-warning": {},
TeX: {},
MathML: {},

View File

@ -38,6 +38,7 @@ MathJax.Localization.addTranslation("en",null,{
},
MathMenu: {},
FontWarnings: {},
HelpDialog: {},
"v1.0-warning": {},
TeX: {},
MathML: {},

View File

@ -38,6 +38,7 @@ MathJax.Localization.addTranslation("fr",null,{
},
MathMenu: {},
FontWarnings: {},
HelpDialog: {},
"v1.0-warning": {},
TeX: {},
MathML: {},