diff --git a/InvenTree/company/templates/company/index.html b/InvenTree/company/templates/company/index.html index 82655557e6..776e16140e 100644 --- a/InvenTree/company/templates/company/index.html +++ b/InvenTree/company/templates/company/index.html @@ -25,6 +25,7 @@ + diff --git a/InvenTree/part/templates/part/category_parts.html b/InvenTree/part/templates/part/category_parts.html index 6b5321e476..dadebe7818 100644 --- a/InvenTree/part/templates/part/category_parts.html +++ b/InvenTree/part/templates/part/category_parts.html @@ -1,12 +1,88 @@ - +
+
+ + + + +
+ +
+ -{% for part in parts %} - - - - -{% endfor %} -
Part DescriptionCategory
{{ part.name }}{{ part.description }}
\ No newline at end of file + + + + +{% load static %} + + + + \ No newline at end of file diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 883d09e1cf..0b2b768a93 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -24,7 +24,7 @@ class PartIndex(ListView): context_object_name = 'parts' def get_queryset(self): - return Part.objects.filter(category=None) + return Part.objects.all() # filter(category=None) def get_context_data(self, **kwargs): diff --git a/InvenTree/static/script/delay.js b/InvenTree/static/script/delay.js new file mode 100644 index 0000000000..9070d0c5b9 --- /dev/null +++ b/InvenTree/static/script/delay.js @@ -0,0 +1,12 @@ +var msDelay = 0; + +var delay = (function(){ + return function(callback, ms){ + clearTimeout(msDelay); + msDelay = setTimeout(callback, ms); + }; +})(); + +function cancelTimer(){ + clearTimeout(msDelay); +} \ No newline at end of file diff --git a/InvenTree/static/script/filter_company.js b/InvenTree/static/script/filter_company.js index 8b36847680..feff8dcaca 100644 --- a/InvenTree/static/script/filter_company.js +++ b/InvenTree/static/script/filter_company.js @@ -1,12 +1,3 @@ -var keyDelay = 0; - -var delay = (function(){ - return function(callback, ms){ - clearTimeout(keyDelay); - keyDelay = setTimeout(callback, ms); - }; -})(); - function add_company(company){ @@ -47,8 +38,8 @@ $(document).ready(function(){ $("#company-filter").keyup(function(e) { if (e.keyCode == 27){ // Escape key - clearTimeout(keyDelay); $("#company-filter").val(''); + cancelTimer(); filter(''); } else {