|
|
@ -1,4 +1,8 @@ |
|
|
(function () { |
|
|
(function () { |
|
|
|
|
|
// Write selected payment type to cookie anyways
|
|
|
|
|
|
const paymentTypeId = $(".payment-list").find(".is-selected").attr('data-payment-id'); |
|
|
|
|
|
abp.utils.setCookieValue("selected_payment_id", paymentTypeId); |
|
|
|
|
|
|
|
|
abp.widgets.PaymentWidget = function ($wrapper) { |
|
|
abp.widgets.PaymentWidget = function ($wrapper) { |
|
|
var widgetManager = $wrapper.data('abp-widget-manager'); |
|
|
var widgetManager = $wrapper.data('abp-widget-manager'); |
|
|
|
|
|
|
|
|
@ -7,7 +11,6 @@ |
|
|
.find('.address-list .card') |
|
|
.find('.address-list .card') |
|
|
.click(function () { |
|
|
.click(function () { |
|
|
const $this = $(this); |
|
|
const $this = $(this); |
|
|
// const addressId = $this.attr('data-address-id');
|
|
|
|
|
|
$this.parents(".address-list").find('.card').removeClass("is-selected"); |
|
|
$this.parents(".address-list").find('.card').removeClass("is-selected"); |
|
|
$this.addClass("is-selected"); |
|
|
$this.addClass("is-selected"); |
|
|
}); |
|
|
}); |
|
|
@ -16,7 +19,8 @@ |
|
|
.find('.payment-list .card') |
|
|
.find('.payment-list .card') |
|
|
.click(el => { |
|
|
.click(el => { |
|
|
const $this = $(el.currentTarget); |
|
|
const $this = $(el.currentTarget); |
|
|
// const paymentTypeId = $this.attr('data-payment-id');
|
|
|
const paymentTypeId = $this.attr('data-payment-id'); |
|
|
|
|
|
abp.utils.setCookieValue("selected_payment_id", paymentTypeId); |
|
|
$this.parents(".payment-list").find('.card').removeClass("is-selected"); |
|
|
$this.parents(".payment-list").find('.card').removeClass("is-selected"); |
|
|
$this.addClass("is-selected"); |
|
|
$this.addClass("is-selected"); |
|
|
}); |
|
|
}); |
|
|
|