mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Visual hack for custom part card view
This commit is contained in:
parent
f0cf83a0b8
commit
3ba7b2d136
@ -516,11 +516,21 @@ function loadPartTable(table, url, options={}) {
|
||||
|
||||
var html = '';
|
||||
|
||||
data.forEach(function(row) {
|
||||
html = `<div class='row'>`;
|
||||
|
||||
data.forEach(function(row, index) {
|
||||
|
||||
// Force a new row every 4 columns, to prevent visual issues
|
||||
if ((index > 0) && (index % 4 == 0) && (index < data.length)) {
|
||||
html += `</div><div class='row'>`;
|
||||
}
|
||||
|
||||
html += partGridTile(row);
|
||||
});
|
||||
|
||||
return `<div class='row mx-0'>${html}</div>`;
|
||||
html += `</div>`;
|
||||
|
||||
return html;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user