mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Display inherited rows a bit differenter
This commit is contained in:
parent
5b402b6bc0
commit
1eb2456e3d
@ -307,6 +307,11 @@
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.rowinherited {
|
||||
background-color: #efe;
|
||||
opacity: 90%;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
padding-left: 1px;
|
||||
margin-left: 1px;
|
||||
|
@ -72,11 +72,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped table-condensed' data-toolbar="#button-toolbar" id='bom-table'>
|
||||
<table class='table table-bom table-condensed' data-toolbar="#button-toolbar" id='bom-table'>
|
||||
</table>
|
||||
|
||||
<table class='table table-striped table-condensed' id='test-table'></table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
|
@ -420,15 +420,24 @@ function loadBomTable(table, options) {
|
||||
sortable: true,
|
||||
search: true,
|
||||
rowStyle: function(row, index) {
|
||||
if (row.validated) {
|
||||
return {
|
||||
classes: 'rowvalid'
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
classes: 'rowinvalid'
|
||||
};
|
||||
|
||||
var classes = [];
|
||||
|
||||
// Shade rows differently if they are for different parent parts
|
||||
if (row.part != options.parent_id) {
|
||||
classes.push('rowinherited');
|
||||
}
|
||||
|
||||
if (row.validated) {
|
||||
classes.push('rowvalid');
|
||||
} else {
|
||||
classes.push('rowinvalid');
|
||||
}
|
||||
|
||||
return {
|
||||
classes: classes.join(' '),
|
||||
};
|
||||
|
||||
},
|
||||
formatNoMatches: function() {
|
||||
return '{% trans "No BOM items found" %}';
|
||||
|
Loading…
Reference in New Issue
Block a user