summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/nav
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-07-14 15:57:59 +0200
committerJules Laplace <julescarbon@gmail.com>2019-07-14 15:57:59 +0200
commit6d71b12ed61d19f8b6f25dfe93c37dc57b528f91 (patch)
treed24e8a79b2ac310c85bc8d1edb9378bcde88f541 /StoneIsland/www/js/lib/nav
parentdde692639f095c28f386d15595fb35ea1ca73ec2 (diff)
credit card view id. more aria labelling
Diffstat (limited to 'StoneIsland/www/js/lib/nav')
-rwxr-xr-xStoneIsland/www/js/lib/nav/AddressView.js4
-rwxr-xr-xStoneIsland/www/js/lib/nav/CreditCardView.js4
2 files changed, 5 insertions, 3 deletions
diff --git a/StoneIsland/www/js/lib/nav/AddressView.js b/StoneIsland/www/js/lib/nav/AddressView.js
index 66b80f65..fd0fa59d 100755
--- a/StoneIsland/www/js/lib/nav/AddressView.js
+++ b/StoneIsland/www/js/lib/nav/AddressView.js
@@ -1,5 +1,5 @@
-var AddressID = Math.round(Date.now() % 1000)
+var AddressViewID = Math.round(Date.now() % 1000)
var AddressView = SerializableView.extend({
@@ -16,7 +16,7 @@ var AddressView = SerializableView.extend({
this.parent = opt.parent
this.checkPhone = 'checkPhone' in opt ? opt.checkPhone : true
this.setElement( this.parent.$(".address") )
- this.$el.html(this.template.replace(/{{_id}}/g, AddressID++))
+ this.$el.html(this.template.replace(/{{_id}}/g, AddressViewID++))
},
populate: function(data){
diff --git a/StoneIsland/www/js/lib/nav/CreditCardView.js b/StoneIsland/www/js/lib/nav/CreditCardView.js
index 63784618..af53d964 100755
--- a/StoneIsland/www/js/lib/nav/CreditCardView.js
+++ b/StoneIsland/www/js/lib/nav/CreditCardView.js
@@ -1,4 +1,6 @@
+var CreditCardViewID = Math.round(Date.now() % 1000)
+
var CreditCardView = SerializableView.extend({
template: $("#creditcard_template").html(),
@@ -13,7 +15,7 @@ var CreditCardView = SerializableView.extend({
initialize: function(opt){
this.parent = opt.parent
this.setElement( this.parent.$(".cc") )
- this.$el.html(this.template)
+ this.$el.html(this.template.replace(/{{_id}}/g, CreditCardViewID++))
this.$number = this.$("[name=Number]")
this.$number.validateCreditCard(this.updateCard.bind(this), this.cardOptions)