mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-14 15:41:10 +00:00
Make the part thumbnail selection window searchable
This commit is contained in:
@@ -415,13 +415,16 @@
|
||||
// Callback when the image-selection modal form is displayed
|
||||
// Populate the form with image data (requested via AJAX)
|
||||
|
||||
$("#modal-form").find("#image-select-table").bootstrapTable({
|
||||
pagination: true,
|
||||
pageSize: 25,
|
||||
$("#modal-form").find("#image-select-table").inventreeTable({
|
||||
url: "{% url 'api-part-thumbs' %}",
|
||||
showHeader: false,
|
||||
showColumns: false,
|
||||
clickToSelect: true,
|
||||
sidePagination: 'server',
|
||||
singleSelect: true,
|
||||
formatNoMatches: function() {
|
||||
return '{% trans "No matching images found" %}';
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
@@ -429,6 +432,7 @@
|
||||
{
|
||||
field: 'image',
|
||||
title: 'Image',
|
||||
searchable: true,
|
||||
formatter: function(value, row, index, field) {
|
||||
return "<img src='/media/" + value + "' class='grid-image'/>"
|
||||
}
|
||||
|
Reference in New Issue
Block a user