--- a/includes/clientside/static/autofill.js Wed Jul 08 18:53:45 2009 -0400
+++ b/includes/clientside/static/autofill.js Wed Jul 08 22:27:24 2009 -0400
@@ -60,30 +60,6 @@
}
}
-window.autofill_onload = function()
-{
- if ( this.loaded )
- {
- return true;
- }
-
- var inputs = document.getElementsByClassName('input', 'autofill');
-
- if ( inputs.length > 0 )
- {
- // we have at least one input that needs to be made an autofill element.
- // is spry data loaded?
- load_component('l10n');
- }
-
- this.loaded = true;
-
- for ( var i = 0; i < inputs.length; i++ )
- {
- autofill_init_element(inputs[i]);
- }
-}
-
window.autofill_init_element = function(element, params)
{
if ( element.af_initted )
@@ -126,6 +102,32 @@
autofill_init_element(el, {});
}
+// note: init, then onload (the latter is called automatically)
+
+window.autofill_onload = function()
+{
+ if ( this.loaded )
+ {
+ return true;
+ }
+
+ var inputs = document.getElementsByClassName('input', 'autofill');
+
+ if ( inputs.length > 0 )
+ {
+ // we have at least one input that needs to be made an autofill element.
+ // is spry data loaded?
+ load_component('l10n');
+ }
+
+ this.loaded = true;
+
+ for ( var i = 0; i < inputs.length; i++ )
+ {
+ autofill_init_element(inputs[i]);
+ }
+}
+
window.autofill_init = function()
{
load_component(['l10n', 'jquery', 'jquery-ui']);