Merge branch 'frontend' of https://github.com/thelia/thelia into frontend

This commit is contained in:
touffies
2013-10-23 16:51:30 +02:00
12 changed files with 192 additions and 36 deletions

View File

@@ -223,10 +223,12 @@
var $old_price_container = $(".old-price", $("#product-details"));
var $select_quantity = $(this).find(":selected").attr("data-quantity");
// Switch Quantity in product page
$("select", $(".product-options")).change(function(){
var $select_quantity = $(this).find(":selected").attr("data-quantity");
$select_quantity = $(this).find(":selected").attr("data-quantity");
var $old_price = $(this).find(":selected").attr("data-old-price");
var $best_price = $(this).find(":selected").attr("data-price");
@@ -278,7 +280,31 @@
});
}
$(".form-product").submit(function(){
var url_action = $(this).attr("action");
var $cartContainer = $(".cart-container");
$.ajax({type:"POST", data: $(this).serialize(), url:url_action,
success: function(data){
console.log($(data).html());
$cartContainer.html($(data).html());
$.ajax({url:"ajax/addCartMessage",
success: function(data){
bootbox.dialog({
message : data,
buttons : {}
});
}
});
},
error: function(){
console.log('Error.');
}
});
return false;
});
$('#limit-top').change(function(e){
window.location = $(this).val()

View File

@@ -101,3 +101,22 @@ ul {
}
}
}
.modal-dialog{
td{vertical-align: middle}
.close{
margin: 10px;
position: relative; z-index: 10;
}
.btn{
margin-left: 10px;
}
}
@media screen and (min-width: 768px){
.modal-dialog{
width: 800px;
}
}

View File

@@ -4,6 +4,11 @@
float: right;
font-size: .6em;
}
h3{
top: -14px !important;
margin: 0;
}
}
@@ -143,4 +148,4 @@
min-height: 180px; height: auto!important; height: 180px;
}
}
}
}