mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
update on cart.js pull request feedback
This commit is contained in:
@@ -24,9 +24,6 @@ $.extend(shopping_cart, {
|
|||||||
if($(this).prop("checked")) {
|
if($(this).prop("checked")) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
// freeze ui and wait for response:
|
|
||||||
frappe.freeze();
|
|
||||||
|
|
||||||
// uncheck other shipping or billing addresses:
|
// uncheck other shipping or billing addresses:
|
||||||
if ( $(this).is('input[data-fieldname=customer_address]') ) {
|
if ( $(this).is('input[data-fieldname=customer_address]') ) {
|
||||||
$('input[data-fieldname=customer_address]').not(this).prop('checked', false);
|
$('input[data-fieldname=customer_address]').not(this).prop('checked', false);
|
||||||
@@ -37,6 +34,7 @@ $.extend(shopping_cart, {
|
|||||||
return frappe.call({
|
return frappe.call({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
method: "erpnext.shopping_cart.cart.update_cart_address",
|
method: "erpnext.shopping_cart.cart.update_cart_address",
|
||||||
|
freeze: true,
|
||||||
args: {
|
args: {
|
||||||
address_fieldname: $(this).attr("data-fieldname"),
|
address_fieldname: $(this).attr("data-fieldname"),
|
||||||
address_name: $(this).attr("data-address-name")
|
address_name: $(this).attr("data-address-name")
|
||||||
@@ -45,8 +43,6 @@ $.extend(shopping_cart, {
|
|||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
$(".cart-tax-items").html(r.message.taxes);
|
$(".cart-tax-items").html(r.message.taxes);
|
||||||
}
|
}
|
||||||
// unfreeze:
|
|
||||||
frappe.unfreeze();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user