mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
BOM table improvements
- Add part image - Replace button text with icons - Fix bug in BOM download
This commit is contained in:
parent
82eceac604
commit
4c4df194fa
@ -6,6 +6,10 @@
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.glyphicon-small {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.starred-part {
|
||||
color: #ffcc00;
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ function downloadBom(options = {}) {
|
||||
|
||||
modalSetContent(modal, content);
|
||||
|
||||
modalEnable(modal, true);
|
||||
|
||||
$(modal).on('click', '#modal-form-submit', function() {
|
||||
$(modal).modal('hide');
|
||||
|
||||
@ -91,7 +93,7 @@ function loadBomTable(table, options) {
|
||||
title: 'Part',
|
||||
sortable: true,
|
||||
formatter: function(value, row, index, field) {
|
||||
return renderLink(value.name, value.url);
|
||||
return imageHoverIcon(value.image_url) + renderLink(value.name, value.url);
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -127,8 +129,8 @@ function loadBomTable(table, options) {
|
||||
if (options.editable) {
|
||||
cols.push({
|
||||
formatter: function(value, row, index, field) {
|
||||
var bEdit = "<button class='btn btn-success bom-edit-button btn-sm' type='button' url='/part/bom/" + row.pk + "/edit'>Edit</button>";
|
||||
var bDelt = "<button class='btn btn-danger bom-delete-button btn-sm' type='button' url='/part/bom/" + row.pk + "/delete'>Delete</button>";
|
||||
var bEdit = "<button title='Edit BOM Item' class='btn btn-success bom-edit-button btn-sm' type='button' url='/part/bom/" + row.pk + "/edit'><span class='glyphicon glyphicon-small glyphicon-pencil'></span></button>";
|
||||
var bDelt = "<button title='Delete BOM Item' class='btn btn-danger bom-delete-button btn-sm' type='button' url='/part/bom/" + row.pk + "/delete'><span class='glyphicon glyphicon-small glyphicon-trash'></span></button>";
|
||||
|
||||
return "<div class='btn-group'>" + bEdit + bDelt + "</div>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user