--- a/Floodlight.php Sun Dec 21 23:19:03 2008 -0500
+++ b/Floodlight.php Fri May 29 14:35:29 2009 -0400
@@ -30,7 +30,7 @@
{
return;
}
- $hackme = str_replace('<input name="q"', '<input name="q" autocomplete="off" onkeyup="this.onkeyup = null; this.className = \'autofill floodlight\'; autofill_init_element(this, {});"', $hackme);
+ $hackme = str_replace('<input name="q"', '<input name="q" autocomplete="off" onkeyup="this.setAttribute(\'autocomplete\', \'off\'); this.onkeyup = null; this.className = \'autofill floodlight\'; autofill_init_element(this, {});"', $hackme);
}
function floodlight_perform_search(&$dataset)
@@ -118,11 +118,30 @@
{
window.location = makeUrl(li.selectValue.replace(/^go:/, ''));
},
- width: 300,
+ width: 180,
noResultsHTML: '<tr><td class="row1" style="font-size: smaller;">' + \$lang.get('floodlight_msg_no_results') + '</td></tr>',
});
}
};
+
+function AutofillFloodlight(el, p)
+{
+ p = p || {};
+ var cn_append = ( el.className ) ? ' ' + el.className : '';
+ el.className = 'autofill floodlight' + cn_append;
+ el.onkeyup = null;
+ autofill_init_element(el, p);
+}
+
+addOnloadHook(function()
+ {
+ if ( document.forms[0] && document.forms[0].q )
+ {
+ document.forms[0].q.onkeyup = function() {
+ new AutofillFloodlight(this);
+ };
+ }
+ });
EOF;
}