mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
refactor
This commit is contained in:
parent
866c8af393
commit
6ca34276bd
@ -80,6 +80,16 @@ function inventreeDocReady() {
|
||||
attachClipboard('.clip-btn');
|
||||
attachClipboard('.clip-btn', 'modal-about'); // modals
|
||||
attachClipboard('.clip-btn-version', 'modal-about', 'about-copy-text'); // version-text
|
||||
|
||||
// Add autocomplete to the search-bar
|
||||
$("#search-bar" ).autocomplete({
|
||||
source: "{% url 'search-api' %}",
|
||||
minLength: 2,
|
||||
classes: {'ui-autocomplete': 'dropdown-menu'},
|
||||
select: function( event, ui ) {
|
||||
window.location = '/part/' + ui.item.id + '/';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function isFileTransfer(transfer) {
|
||||
|
@ -191,15 +191,6 @@ $(document).ready(function () {
|
||||
{% endif %}
|
||||
|
||||
moment.locale('{{request.LANGUAGE_CODE}}');
|
||||
|
||||
$("#search-bar" ).autocomplete({
|
||||
source: "{% url 'search-api' %}",
|
||||
minLength: 2,
|
||||
classes: {'ui-autocomplete': 'dropdown-menu'},
|
||||
select: function( event, ui ) {
|
||||
window.location = '/part/' + ui.item.id + '/';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user