added no cart duplication, added tabs animation
This commit is contained in:
parent
4b924fc30e
commit
2fabe3ab63
@ -63,6 +63,14 @@ Template.admin.events({
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var cart_number = $("input[name='acnumber']")[0].value;
|
var cart_number = $("input[name='acnumber']")[0].value;
|
||||||
|
var currCName = carts.find({ number: cart_number }).fetch()
|
||||||
|
|
||||||
|
if(currCName.length !== 0) {
|
||||||
|
alert("That cart already exists!");
|
||||||
|
$("input[name='acnumber']")[0].value = "";
|
||||||
|
$("input[name='acnumber']").focus();
|
||||||
|
throw new Error("That cart already exists!");
|
||||||
|
}
|
||||||
|
|
||||||
if (!((cart_number === "")))
|
if (!((cart_number === "")))
|
||||||
|
|
||||||
|
|||||||
@ -8,20 +8,27 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
float: left;
|
float: left;
|
||||||
padding: 13px 23.18%;
|
padding: 13px 23.24%;
|
||||||
margin: 0;
|
border-bottom: 5px solid #ddd;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-bottom:3%;
|
margin-bottom:3%;
|
||||||
|
transition: background-color 0.4s;
|
||||||
|
transition: border-bottom 0.4s
|
||||||
}
|
}
|
||||||
.tab-item.active {
|
.tab-item.active {
|
||||||
border-radius: top 5px;
|
border-bottom: 5px solid #E14C2B;
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-bottom: none;
|
|
||||||
margin-bottom: -1px !important;
|
margin-bottom: -1px !important;
|
||||||
padding: 13px 23.15% 14px 23.15% !important;
|
box-shadow: inset 1px 1px 1px #ddd;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.tab-item:hover {
|
||||||
|
background-color: rgba(212, 212, 212, .7);
|
||||||
|
border-bottom: 5px solid rgba(225, 76, 43, .5);
|
||||||
|
}
|
||||||
|
.tab-item.active:hover {
|
||||||
|
border-bottom: 5px solid #E14C2B;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #333;
|
|
||||||
}
|
}
|
||||||
.tabs-content-container {
|
.tabs-content-container {
|
||||||
padding: 4.2% 15px 15px 15px;
|
padding: 4.2% 15px 15px 15px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user