mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +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 = '';
|
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);
|
html += partGridTile(row);
|
||||||
});
|
});
|
||||||
|
|
||||||
return `<div class='row mx-0'>${html}</div>`;
|
html += `</div>`;
|
||||||
|
|
||||||
|
return html;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user