2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 21:45:39 +00:00

Improvements to "grid view" for parts list

- Display 5 tiles per line
- Reduce padding
- Add border
This commit is contained in:
Oliver
2021-10-18 12:19:16 +11:00
parent addb265984
commit 68cfd8615e
2 changed files with 10 additions and 3 deletions

View File

@ -778,7 +778,7 @@ function partGridTile(part) {
var html = `
<div class='col-sm-3 card'>
<div class='product-card card'>
<div class='panel panel-default panel-inventree product-card-panel'>
<div class='panel-heading'>
<a href='/part/${part.pk}/'>
@ -1000,8 +1000,8 @@ function loadPartTable(table, url, options={}) {
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)) {
// Force a new row every 5 columns
if ((index > 0) && (index % 5 == 0) && (index < data.length)) {
html += `</div><div class='row full-height'>`;
}