Supplier > Create Product new design Nov 6
Supplier > Create Product new design Nov 6
by pj_js15
HTML
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<div class="sales-unit-type-container">
<div class="unit-type-item">
<div class="item-header">
<p>Carton Units</p>
</div>
<div class="image-container">
<img src="https://www.banthebottle.net/wp-content/uploads/2014/09/bottled-water.jpeg" />
</div>
<p class="item-desc">Eg. Bottled Water</p>
<ul class="item-details">
<li>Supplier sells and invoices in Carton</li>
<li>Supplier sells and invoices in Carton</li>
<li>Supplier sells and invoices in Carton</li>
<li>Supplier sells and invoices in Carton</li>
</ul>
<div class="button-container">
<label class="btn btn-primary">
<input type="radio" name="salesUnitType"
class="rdb-select-sales-unit-type" id="option1"> Select
</label>
</div>
<div class="more-info">
<span>
More info <i class="fa fa-angle-down"></i>
</span>
</div>
<div class="more-info-details hidden">
<table> <tr> <td rowspan="4" class="row-header">Retailer Buy</td> <td>Base consumer units</td> <td>24</td> </tr> <tr> <td>Carton net weight</td> <td>24.000 Kg</td> </tr> <tr> <td>List price</td> <td>$48.00 / Carton of 24</td> </tr> <tr> <td>Unit cost (calculated)</td> <td>2.00 / Each</td> </tr> </table> <table> <tr> <td rowspan="2" class="row-header">Retailer Sell</td> <td>RRP</td> <td>$3.50 / Each</td> </tr> <tr> <td>GP % (calculated)</td> <td>42.9%</td> </tr> </table>
</div>
</div>
<div class="unit-type-item">
<div class="item-header">
<p>Carton Catch Weight (C/W)</p>
</div>
<div class="image-container">
<img...
CSS
*{
font-family: Arial;
}
.hidden{
display: none;
}
.sales-unit-type-container{
padding: 20px;
border: 1px solid gray;
}
.unit-type-item{
border: 1px solid #CCC;
display: inline-block;
margin: 0 15px;
width: 260px;
vertical-align: top;
opacity: 0.7;
}
.unit-type-item .item-header{
background-color: #1087B0;
border: none;
color: #FFF;
height: 50px;
text-align: center;
margin: 1px;
display: flex;
justify-content:center;
align-content:center;
flex-direction:column;
}
.unit-type-item .item-header p{
margin: 0;
font-weight: bold;
font-size: 16px;
line-height: 19px;
vertical-align: middle;
}
.image-container{
margin: 20px 0;
text-align: center;
}
.image-container img{
height: 110px;
}
p.item-desc{
color: #1087B0;
font-weight: bold;
font-size: 14px;
line-height: 19px;
text-align: center;
}
ul.item-details{
list-style-type: none;
}
ul.item-details li:before{
content:"\2714\0020";
color: #1087B0;
font-weight: bold;
}
ul.item-details li{
font-size: 11px;
color: #858585;
line-height: 12px;
margin: 12px 0;
}
.button-container{
text-align: center;
padding: 20px;
}
.button-container .btn-primary {
color: #666666;
background-color: #F9E5C4;
border-color: #F2BF6E;
font-weight: bold;
font-size: 16px;
line-height: 19px;
width: 110px;
box-sizing: border-box;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.25), inset 0px -2px 0px rgba(242, 191, 110, 0.25);
border-radius: 2px;
}
.button-container .rdb-select-sales-unit-type{
display: none;
}
.more-info{
border-top: 1px solid #CCC;
padding: 10px;
text-align: center;
}
.more-info span{
font-size: 12px;
font-weight: bold;
line-height: 14px;
position: relative;
cursor: pointer;
color:...
JavaScript
$().ready(function(){
$('.more-info').click(function(){
$(this).parent().find('.more-info-details').toggleClass('hidden');
$(this).find('i.fa').toggleClass('fa-angle-down fa-angle-up');
});
$('.rdb-select-sales-unit-type').change(
function(){
$('.rdb-select-sales-unit-type').parent().parent().parent().removeClass('active');
if ($(this).is(':checked')) {
// append goes here
//Change container style to active
$(this).parent().parent().parent().addClass('active');
}
});
});