mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Refactor table_filters javascript file to prevent loading on every single page
This commit is contained in:
parent
f3c71bd96f
commit
fe99e92bfc
@ -81,6 +81,7 @@ dynamic_javascript_urls = [
|
|||||||
url(r'^order.js', DynamicJsView.as_view(template_name='js/order.html'), name='order.js'),
|
url(r'^order.js', DynamicJsView.as_view(template_name='js/order.html'), name='order.js'),
|
||||||
url(r'^company.js', DynamicJsView.as_view(template_name='js/company.html'), name='company.js'),
|
url(r'^company.js', DynamicJsView.as_view(template_name='js/company.html'), name='company.js'),
|
||||||
url(r'^bom.js', DynamicJsView.as_view(template_name='js/bom.html'), name='bom.js'),
|
url(r'^bom.js', DynamicJsView.as_view(template_name='js/bom.html'), name='bom.js'),
|
||||||
|
url(r'^table_filters.js', DynamicJsView.as_view(template_name='js/table_filters.html'), name='table_filters.js'),
|
||||||
]
|
]
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
@ -114,6 +114,7 @@ InvenTree
|
|||||||
<script type='text/javascript' src="{% url 'stock.js' %}"></script>
|
<script type='text/javascript' src="{% url 'stock.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% url 'build.js' %}"></script>
|
<script type='text/javascript' src="{% url 'build.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% url 'order.js' %}"></script>
|
<script type='text/javascript' src="{% url 'order.js' %}"></script>
|
||||||
|
<script type='text/javascript' src="{% url 'table_filters.js' %}"></script>
|
||||||
|
|
||||||
<script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script>
|
<script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'fontawesome/js/brands.js' %}"></script>
|
<script type='text/javascript' src="{% static 'fontawesome/js/brands.js' %}"></script>
|
||||||
@ -122,8 +123,6 @@ InvenTree
|
|||||||
{% block js_load %}
|
{% block js_load %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% include "table_filters.html" %}
|
|
||||||
|
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load status_codes %}
|
{% load status_codes %}
|
||||||
|
|
||||||
<script type='text/javascript'>
|
|
||||||
|
|
||||||
{% include "status_codes.html" with label='stock' options=StockStatus.list %}
|
{% include "status_codes.html" with label='stock' options=StockStatus.list %}
|
||||||
{% include "status_codes.html" with label='build' options=BuildStatus.list %}
|
{% include "status_codes.html" with label='build' options=BuildStatus.list %}
|
||||||
{% include "status_codes.html" with label='purchaseOrder' options=PurchaseOrderStatus.list %}
|
{% include "status_codes.html" with label='purchaseOrder' options=PurchaseOrderStatus.list %}
|
||||||
@ -124,4 +122,3 @@ function getAvailableTableFilters(tableKey) {
|
|||||||
// Finally, no matching key
|
// Finally, no matching key
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
</script>
|
|
Loading…
Reference in New Issue
Block a user