mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Add JS
This commit is contained in:
		| @@ -193,6 +193,34 @@ src="{% static 'img/blank_image.png' %}" | ||||
| {% block js_ready %} | ||||
| {{ block.super }} | ||||
|  | ||||
| onPanelLoad("attachments", function() { | ||||
|     loadAttachmentTable('{% url "api-manufacturer-part-attachment-list" %}', { | ||||
|         filters: { | ||||
|             manufacturer_part: {{ part.pk }}, | ||||
|         }, | ||||
|         fields: { | ||||
|             manufacturer_part: { | ||||
|                 value: {{ part.pk }}, | ||||
|                 hidden: true | ||||
|             } | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     enableDragAndDrop( | ||||
|         '#attachment-dropzone', | ||||
|         '{% url "api-manufacturer-part-attachment-list" %}', | ||||
|         { | ||||
|             data: { | ||||
|                 manufacturer_part: {{ part.id }}, | ||||
|             }, | ||||
|             label: 'attachment', | ||||
|             success: function(data, status, xhr) { | ||||
|                 reloadAttachmentTable(); | ||||
|             } | ||||
|         } | ||||
|     ); | ||||
| }); | ||||
|  | ||||
| function reloadParameters() { | ||||
|     $("#parameter-table").bootstrapTable("refresh"); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user