2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Fix JS linting workflow (#4915)

* Add bad .js code

- Call function which has not been defined
- Should throw JS lint error

* update eslint

- Move to newer version of eslint
- Change default rules

* Fixes for tables.js

* Fixes for table_filters.js

* Fixes for stock.js

* Fix for sales_order.js and search.js

* Fix return_order.js

* Fixes for purchase_order.js

* More updates

- part.js
- plugin.js
- pricing.js

* Updates

- order.js

* Even morerer updates

- label.js
- modals.js
- model_renderers.js
- news.js
- notification.js

* More, MORE!

- build.js
- company.js
- charts.js
- filters.js
- forms.js
- helpers.js

* Final?

- api.js
- attachment.js
- barcode.js
- bom.js

* Fix 'useless-escape'

* Disable no-useless-escape rule
This commit is contained in:
Oliver
2023-05-30 22:55:53 +10:00
committed by GitHub
parent 0808382d06
commit 92930d475c
29 changed files with 1190 additions and 130 deletions

View File

@ -1,6 +1,11 @@
{% load i18n %}
/* globals
getModelRenderer,
inventreeGet,
inventreePut,
sanitizeInputString,
user_settings,
*/
/* exported
@ -102,6 +107,10 @@ var searchQuery = null;
var searchResultTypes = [];
var searchRequest = null;
/*
* Callback for when the search text is changed
*/
function searchTextChanged(event) {
var text = $('#offcanvas-search').find('#search-input').val();
@ -110,9 +119,12 @@ function searchTextChanged(event) {
clearTimeout(searchInputTimer);
searchInputTimer = setTimeout(updateSearch, 250);
};
}
/*
* Update the search results
*/
function updateSearch() {
if (searchText == searchTextCurrent) {