Don't inject autosuggest bits where we dont need it
This commit is contained in:
parent
d6addb595b
commit
896cc75f57
2 changed files with 6 additions and 2 deletions
|
@ -296,6 +296,8 @@ FormSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:
|
|||
|
||||
function initSuggestions () {
|
||||
var inputs = document.getElementsByTagName ("input");
|
||||
if (inputs.length == 0)
|
||||
return false;
|
||||
|
||||
for (i=0;i<inputs.length;i++)
|
||||
{
|
||||
|
@ -308,4 +310,5 @@ function initSuggestions () {
|
|||
if (inputs[i].type == "text" && autocomplete != "off")
|
||||
var smth = new AutoSuggestControl (inputs[i], new FormSuggestions (ename));
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
|
|
@ -64,7 +64,8 @@ formhistory_prepare_js ()
|
|||
"function () {"
|
||||
" if (document.getElementById('formhistory'))"
|
||||
" return;"
|
||||
" initSuggestions ();"
|
||||
" if (!initSuggestions ())"
|
||||
" return;"
|
||||
" var mystyle = document.createElement('style');"
|
||||
" mystyle.setAttribute('type', 'text/css');"
|
||||
" mystyle.setAttribute('id', 'formhistory');"
|
||||
|
|
Loading…
Reference in a new issue