diff options
Diffstat (limited to 'StoneIsland/www/js/lib/cart/CartShipping.js')
| -rwxr-xr-x | StoneIsland/www/js/lib/cart/CartShipping.js | 11 |
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 |
