summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/nav/AddressView.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-07-14 13:25:33 +0200
committerJules Laplace <julescarbon@gmail.com>2019-07-14 13:25:33 +0200
commitca57b4538cdc3d1d11d1aeb055e038cec2d48a35 (patch)
tree81af3acb2bb7ddcaebacbb716df839ed20ccc1af /StoneIsland/www/js/lib/nav/AddressView.js
parente7df26edfb920e39bd45bef40830c8e6f2e88ed3 (diff)
adding ids to addressview
Diffstat (limited to 'StoneIsland/www/js/lib/nav/AddressView.js')
-rwxr-xr-xStoneIsland/www/js/lib/nav/AddressView.js4
1 files changed, 3 insertions, 1 deletions
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){