summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/cart/CartShipping.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-05-06 15:22:04 +0200
committerJules Laplace <julescarbon@gmail.com>2020-05-06 15:22:04 +0200
commita0a1eb402d84be81000ed608d3da40a495cc6d34 (patch)
treeeddd5d6c13005cd9ab6b2c8354573fa617e6de14 /StoneIsland/www/js/lib/cart/CartShipping.js
parent9c18073017b5cc2334bf1867c004bfc74ba5a92a (diff)
cart accessibility
Diffstat (limited to 'StoneIsland/www/js/lib/cart/CartShipping.js')
-rwxr-xr-xStoneIsland/www/js/lib/cart/CartShipping.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/cart/CartShipping.js b/StoneIsland/www/js/lib/cart/CartShipping.js
index b5d6647b..157e75f5 100755
--- a/StoneIsland/www/js/lib/cart/CartShipping.js
+++ b/StoneIsland/www/js/lib/cart/CartShipping.js
@@ -43,8 +43,8 @@ var CartShipping = FormView.extend({
this.toggle_dropdown(false)
return
}
- app.account.addresses.forEach(function(address){
- var t = this.template.replace(/{{id}}/g, address.Id)
+ app.account.addresses.forEach(function(address, i){
+ var t = this.template.replace(/{{id}}/g, (address.Id || i))
.replace(/{{checked}}/g, address.IsDefault ? "checked" : "")
.replace(/{{name}}/g, (address.Name + " " + address.Surname).toUpperCase())
.replace(/{{address}}/g, address.Address.replace(/\n$/,"").replace("\n", ", "))
@@ -69,6 +69,9 @@ var CartShipping = FormView.extend({
$("#standard-shipping").prop("checked", cart_data.Cart.DeliveryMethod.Type == 1)
$("#express-shipping").prop("checked", cart_data.Cart.DeliveryMethod.Type == 2)
}
+ this.$("input,select").map(function(i) {
+ this.setAttribute('tabindex', i+1)
+ })
},
toggle_dropdown: function(state){
@@ -80,6 +83,10 @@ var CartShipping = FormView.extend({
this.address.disabled = this.list_mode
this.$address_form.toggle(! this.list_mode)
this.$address_list.toggle(this.list_mode)
+ this.scroller.refresh()
+ this.$("input,select").map(function(i) {
+ this.setAttribute('tabindex', i+1)
+ })
},
// sdk.cart.set_shipping_address