From ca57b4538cdc3d1d11d1aeb055e038cec2d48a35 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 14 Jul 2019 13:25:33 +0200 Subject: adding ids to addressview --- StoneIsland/www/js/lib/nav/AddressView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'StoneIsland/www/js/lib/nav/AddressView.js') diff --git a/StoneIsland/www/js/lib/nav/AddressView.js b/StoneIsland/www/js/lib/nav/AddressView.js index 02163d51..364b35ff 100755 --- a/StoneIsland/www/js/lib/nav/AddressView.js +++ b/StoneIsland/www/js/lib/nav/AddressView.js @@ -1,4 +1,6 @@ +var AddressID = Math.round(Date.now() % 1000) + var AddressView = SerializableView.extend({ template: $("#address_template").html(), @@ -14,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) + this.$el.html(this.template.replace(/{{_id}}/g, AddressID++)) }, populate: function(data){ -- cgit v1.2.3-70-g09d2