Remove unused JavaScript
This commit is contained in:
parent
0f5ae8eea6
commit
13470e9781
15 changed files with 3 additions and 3037 deletions
|
@ -1,31 +0,0 @@
|
|||
import $ from 'jquery';
|
||||
import Bloodhound from 'bloodhound-js';
|
||||
|
||||
const display = 'label';
|
||||
|
||||
const bloodhound = new Bloodhound({
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(display),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
|
||||
remote: {
|
||||
url: '/ban/search?request=%QUERY',
|
||||
wildcard: '%QUERY'
|
||||
}
|
||||
});
|
||||
|
||||
bloodhound.initialize();
|
||||
|
||||
function bindTypeahead() {
|
||||
$('input[data-address="true"]').typeahead(
|
||||
{
|
||||
minLength: 1
|
||||
},
|
||||
{
|
||||
display: display,
|
||||
source: bloodhound,
|
||||
limit: 5
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
addEventListener('turbolinks:load', bindTypeahead);
|
Loading…
Add table
Add a link
Reference in a new issue