2013-07-23 13:39:23 +00:00
|
|
|
$(document).ready(function () {
|
2013-08-23 09:40:17 +00:00
|
|
|
$(".oe_website_sale input[name='shipping_different']").change(function () {
|
2013-08-13 10:39:48 +00:00
|
|
|
$(".oe_website_sale .js_shipping").toggle();
|
2013-07-23 13:39:23 +00:00
|
|
|
});
|
2013-08-08 14:23:41 +00:00
|
|
|
|
2013-08-23 09:40:17 +00:00
|
|
|
$(".oe_website_sale .oe_mycart input.js_quantity").change(function () {
|
2013-08-13 10:39:48 +00:00
|
|
|
var value = parseInt($(this).val());
|
|
|
|
if (!isNaN(value)) {
|
2013-09-02 10:46:46 +00:00
|
|
|
window.location.href = window.location.origin + window.location.pathname +
|
|
|
|
'set_cart/?order_line_id=' + $(this).data('id') + '&set_number=' + value;
|
2013-08-13 10:39:48 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2013-08-23 09:40:17 +00:00
|
|
|
$payment = $(".oe_website_sale .js_payment");
|
|
|
|
$("input[name='payment_type']", $payment).click(function (ev) {
|
2013-09-02 15:54:31 +00:00
|
|
|
var payment_id = $(ev.currentTarget).val();
|
2013-08-23 09:40:17 +00:00
|
|
|
$("div[data-id]", $payment).addClass("hidden");
|
|
|
|
$("a.btn:last, div[data-id='"+payment_id+"']", $payment).removeClass("hidden");
|
|
|
|
});
|
2013-09-02 15:54:31 +00:00
|
|
|
|
|
|
|
// change for css
|
|
|
|
$(document).on('mouseup', '.js_publish', function (ev) {
|
|
|
|
$(ev.currentTarget).parents(".thumbnail").toggleClass("disabled");
|
|
|
|
});
|
2013-09-03 08:28:14 +00:00
|
|
|
|
2013-08-05 12:38:36 +00:00
|
|
|
});
|