mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 04:35:42 +00:00 
			
		
		
		
	Refactor table_filters javascript file to prevent loading on every single page
This commit is contained in:
		| @@ -81,6 +81,7 @@ dynamic_javascript_urls = [ | ||||
|     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'^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 = [ | ||||
|   | ||||
| @@ -114,6 +114,7 @@ InvenTree | ||||
| <script type='text/javascript' src="{% url 'stock.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 'table_filters.js' %}"></script> | ||||
|  | ||||
| <script type='text/javascript' src="{% static 'fontawesome/js/solid.js' %}"></script> | ||||
| <script type='text/javascript' src="{% static 'fontawesome/js/brands.js' %}"></script> | ||||
| @@ -122,8 +123,6 @@ InvenTree | ||||
| {% block js_load %} | ||||
| {% endblock %} | ||||
|  | ||||
| {% include "table_filters.html" %} | ||||
|  | ||||
| <script type='text/javascript'> | ||||
|  | ||||
| $(document).ready(function () { | ||||
|   | ||||
| @@ -1,8 +1,6 @@ | ||||
| {% load i18n %} | ||||
| {% load status_codes %} | ||||
| 
 | ||||
| <script type='text/javascript'> | ||||
| 
 | ||||
| {% 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='purchaseOrder' options=PurchaseOrderStatus.list %} | ||||
| @@ -124,4 +122,3 @@ function getAvailableTableFilters(tableKey) { | ||||
|     // Finally, no matching key | ||||
|     return {}; | ||||
| } | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user