A few fixes to the most recently added feature: more efficiency tweaks, tweaked l10n to have beetter fetch-on-demand support to ensure that stubs are never returned
authorDan
Sun, 21 Dec 2008 16:54:04 -0500
changeset 780 f65e35566b63
parent 779 609e35845ec3
child 781 93a61032d33d
A few fixes to the most recently added feature: more efficiency tweaks, tweaked l10n to have beetter fetch-on-demand support to ensure that stubs are never returned
includes/clientside/jsres.php
includes/clientside/static/l10n.js
includes/clientside/static/login.js
--- a/includes/clientside/jsres.php	Sun Dec 21 16:41:03 2008 -0500
+++ b/includes/clientside/jsres.php	Sun Dec 21 16:54:04 2008 -0500
@@ -201,7 +201,7 @@
       $apex = filemtime("includes/clientside/static/$js_file");
       
       $file_contents = file_get_contents("includes/clientside/static/$js_file");
-      $everything .= jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true;';
+      $everything .= jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true; if ( onload_complete ) { runOnloadHooks(); onload_hooks = []; };';
     }
   }
   else
@@ -215,7 +215,7 @@
     $apex = filemtime("includes/clientside/static/$js_file");
     
     $file_contents = file_get_contents("includes/clientside/static/$js_file");
-    $everything = jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true;';
+    $everything = jsres_cache_check($js_file, $file_contents) . ' loaded_components[\'' . $js_file . '\'] = true; if ( onload_complete ) { runOnloadHooks(); onload_hooks = []; };';
   }
 }
 else
--- a/includes/clientside/static/l10n.js	Sun Dec 21 16:41:03 2008 -0500
+++ b/includes/clientside/static/l10n.js	Sun Dec 21 16:54:04 2008 -0500
@@ -74,14 +74,15 @@
   
 }
 
-var $lang = {
-  get: function(t) { return t; },
-  placeholder: true
-};
-
 var language_onload = function()
 {
   $lang = new Language(ENANO_LANG_ID);
 }
 
-addOnloadHook(language_onload);
+var $lang = {
+  get: function(t, s) {
+    language_onload();
+    return $lang.get(t, s);
+  },
+  placeholder: true
+};
--- a/includes/clientside/static/login.js	Sun Dec 21 16:41:03 2008 -0500
+++ b/includes/clientside/static/login.js	Sun Dec 21 16:54:04 2008 -0500
@@ -98,7 +98,7 @@
 
 window.ajaxLoginInit = function(call_on_finish, user_level)
 {
-  load_component(['messagebox', 'flyin', 'jquery', 'jquery-ui', 'l10n', 'crypto']);
+  load_component(['messagebox', 'flyin', 'fadefilter', 'jquery', 'jquery-ui', 'l10n', 'crypto']);
   
   logindata = {};