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;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rowinherited {
|
||||||
|
background-color: #efe;
|
||||||
|
opacity: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown {
|
.dropdown {
|
||||||
padding-left: 1px;
|
padding-left: 1px;
|
||||||
margin-left: 1px;
|
margin-left: 1px;
|
||||||
|
@ -72,11 +72,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
|
|
||||||
<table class='table table-striped table-condensed' id='test-table'></table>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_load %}
|
{% block js_load %}
|
||||||
|
@ -420,15 +420,24 @@ function loadBomTable(table, options) {
|
|||||||
sortable: true,
|
sortable: true,
|
||||||
search: true,
|
search: true,
|
||||||
rowStyle: function(row, index) {
|
rowStyle: function(row, index) {
|
||||||
if (row.validated) {
|
|
||||||
return {
|
var classes = [];
|
||||||
classes: 'rowvalid'
|
|
||||||
};
|
// Shade rows differently if they are for different parent parts
|
||||||
} else {
|
if (row.part != options.parent_id) {
|
||||||
return {
|
classes.push('rowinherited');
|
||||||
classes: 'rowinvalid'
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (row.validated) {
|
||||||
|
classes.push('rowvalid');
|
||||||
|
} else {
|
||||||
|
classes.push('rowinvalid');
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
classes: classes.join(' '),
|
||||||
|
};
|
||||||
|
|
||||||
},
|
},
|
||||||
formatNoMatches: function() {
|
formatNoMatches: function() {
|
||||||
return '{% trans "No BOM items found" %}';
|
return '{% trans "No BOM items found" %}';
|
||||||
|
Loading…
Reference in New Issue
Block a user