Lines 213-218
function autocomplete(inp, nb, left, right) {
Link Here
|
213 |
/* press Esc clear all autocomplete */ |
213 |
/* press Esc clear all autocomplete */ |
214 |
else if (e.keyCode == 8) { |
214 |
else if (e.keyCode == 8) { |
215 |
closeAllLists(); |
215 |
closeAllLists(); |
|
|
216 |
} |
217 |
/* press Tab clear all autocomplete */ |
218 |
else if (e.keyCode == 9) { |
219 |
closeAllLists(); |
216 |
}; |
220 |
}; |
217 |
}); |
221 |
}); |
218 |
function addActive(x) { |
222 |
function addActive(x) { |
Lines 255-262
function autocomplete(inp, nb, left, right) {
Link Here
|
255 |
/* normalyzer hightlight without tags */ |
259 |
/* normalyzer hightlight without tags */ |
256 |
//inp.value = (inp.value.replace(/<\/?[^>]+(>|$)/g, "")).trim(); |
260 |
//inp.value = (inp.value.replace(/<\/?[^>]+(>|$)/g, "")).trim(); |
257 |
inp.value = this.innerText; |
261 |
inp.value = this.innerText; |
258 |
/* Submit form click mouse in div */ |
262 |
|
259 |
this.closest("form").submit(); |
263 |
var autocommit = 1; |
|
|
264 |
const inputs = document.querySelectorAll("#advanced-search input[type='text']"); |
265 |
for (var i = 0; i < inputs.length && autocommit; i++) { |
266 |
var input = inputs[i]; |
267 |
if (input === inp) { |
268 |
autocommit = 0; |
269 |
} |
270 |
} |
271 |
//Submit form click mouse in div if not in advanced search |
272 |
if (autocommit) this.closest("form").submit(); |
260 |
}); |
273 |
}); |
261 |
return b; |
274 |
return b; |
262 |
}; |
275 |
}; |