mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Improvements to "grid view" for parts list
- Display 5 tiles per line - Reduce padding - Add border
This commit is contained in:
		@@ -1074,6 +1074,13 @@ input[type='number']{
 | 
				
			|||||||
    margin-top: 0.5rem;
 | 
					    margin-top: 0.5rem;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.product-card {
 | 
				
			||||||
 | 
					    width: 20%;
 | 
				
			||||||
 | 
					    padding: 5px;
 | 
				
			||||||
 | 
					    min-height: 25px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.product-card-panel{
 | 
					.product-card-panel{
 | 
				
			||||||
    height: 100%;
 | 
					    height: 100%;
 | 
				
			||||||
 | 
					    border: 1px solid #ccc;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -778,7 +778,7 @@ function partGridTile(part) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    var html = `
 | 
					    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 panel-default panel-inventree product-card-panel'>
 | 
				
			||||||
            <div class='panel-heading'>
 | 
					            <div class='panel-heading'>
 | 
				
			||||||
                <a href='/part/${part.pk}/'>
 | 
					                <a href='/part/${part.pk}/'>
 | 
				
			||||||
@@ -1000,8 +1000,8 @@ function loadPartTable(table, url, options={}) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            data.forEach(function(row, index) {
 | 
					            data.forEach(function(row, index) {
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                // Force a new row every 4 columns, to prevent visual issues
 | 
					                // Force a new row every 5 columns
 | 
				
			||||||
                if ((index > 0) && (index % 4 == 0) && (index < data.length)) {
 | 
					                if ((index > 0) && (index % 5 == 0) && (index < data.length)) {
 | 
				
			||||||
                    html += `</div><div class='row full-height'>`;
 | 
					                    html += `</div><div class='row full-height'>`;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user