Autocomplete tags for anything with class=autocomplete_tags
Not all search boxes are tag-search boxes If somebody doesn't want autocompleted tags, then don't use class=autocomplete_tags?
This commit is contained in:
parent
85a5ed2dd6
commit
133616e508
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
document.addEventListener('DOMContentLoaded', () => {
|
||||
var metatags = ['order:id', 'order:width', 'order:height', 'order:filesize', 'order:filename', 'order:favorites'];
|
||||
|
||||
$('[name="search"]').tagit({
|
||||
$('.autocomplete_tags').tagit({
|
||||
singleFieldDelimiter: ' ',
|
||||
beforeTagAdded: function(event, ui) {
|
||||
if(metatags.indexOf(ui.tagLabel) !== -1) {
|
||||
|
|
Reference in a new issue