mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #2175 from SchrodingersGat/grid-view
Improvements to "grid view" for parts list
This commit is contained in:
commit
03726911e1
@ -933,7 +933,8 @@ input[type="submit"] {
|
||||
|
||||
.panel-inventree {
|
||||
padding: 10px;
|
||||
box-shadow: 1px 1px #DDD;
|
||||
box-shadow: 2px 2px #DDD;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
.panel-hidden {
|
||||
@ -1074,6 +1075,14 @@ input[type='number']{
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.product-card {
|
||||
width: 20%;
|
||||
padding: 5px;
|
||||
min-height: 25px;
|
||||
}
|
||||
|
||||
.product-card-panel{
|
||||
height: 100%;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 2px 2px #DDD;
|
||||
}
|
||||
|
@ -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'>`;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user