# HG changeset patch # User Dan # Date 1214513812 14400 # Node ID c97d5f0d6636ef6d38d7afb3da6efc1a5d0fec9f # Parent a38876c0793c271c9039dc10b07366812d9f8820 Installer should work with JS componentization now diff -r a38876c0793c -r c97d5f0d6636 includes/clientside/static/enano-lib-basic.js --- a/includes/clientside/static/enano-lib-basic.js Tue Jun 24 23:37:23 2008 -0400 +++ b/includes/clientside/static/enano-lib-basic.js Thu Jun 26 16:56:52 2008 -0400 @@ -462,4 +462,12 @@ window[i] = placeholder_instances[i].go; } +$lang = { + get: function(a, b) + { + load_component('l10n'); + return $lang.get(a, b); + } +} + //*/ diff -r a38876c0793c -r c97d5f0d6636 includes/clientside/static/l10n.js --- a/includes/clientside/static/l10n.js Tue Jun 24 23:37:23 2008 -0400 +++ b/includes/clientside/static/l10n.js Thu Jun 26 16:56:52 2008 -0400 @@ -4,15 +4,27 @@ var Language = function(lang_id) { - // load the language file - load_show_win('strings'); - var ajax = ajaxMakeXHR(); - var uri = makeUrlNS('Special', 'LangExportJSON/' + lang_id); - ajax.open('GET', uri, false); - ajax.send(null); - if ( ajax.readyState == 4 && ajax.status == 200 ) + var have_lang = false; + + if ( typeof(enano_lang) == 'object' ) + { + if ( typeof(enano_lang[lang_id]) == 'object' ) + { + have_lang = true; + } + } + if ( !have_lang ) { - eval_global(ajax.responseText); + // load the language file + load_show_win('strings'); + var ajax = ajaxMakeXHR(); + var uri = makeUrlNS('Special', 'LangExportJSON/' + lang_id); + ajax.open('GET', uri, false); + ajax.send(null); + if ( ajax.readyState == 4 && ajax.status == 200 ) + { + eval_global(ajax.responseText); + } } if ( typeof(enano_lang) != 'object' ) diff -r a38876c0793c -r c97d5f0d6636 install/includes/stages/login.php --- a/install/includes/stages/login.php Tue Jun 24 23:37:23 2008 -0400 +++ b/install/includes/stages/login.php Thu Jun 26 16:56:52 2008 -0400 @@ -155,6 +155,12 @@ return true; } + addOnloadHook(function() + { + load_component('crypto'); + load_component('l10n'); + }); + // ]]> diff -r a38876c0793c -r c97d5f0d6636 install/includes/ui.php --- a/install/includes/ui.php Tue Jun 24 23:37:23 2008 -0400 +++ b/install/includes/ui.php Thu Jun 26 16:56:52 2008 -0400 @@ -173,6 +173,7 @@ var pagepass=\'\'; var ENANO_LANG_ID = 1; var DISABLE_MCE = true; + var msg_loading_component = \'Loading %component%...\'; '; echo <<