From: Tom Hughes Date: Sun, 14 Oct 2012 13:04:59 +0000 (+0100) Subject: Set attributes on newly created notes X-Git-Tag: live~5052^2~84 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/513bec8044e56bf669d1b2e7ef3a1c4b53362aff Set attributes on newly created notes --- diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 779ae1ab0..9c7d00176 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -30,8 +30,7 @@ $(document).ready(function () { success: function (data) { map.noteSelector.unselect(feature); - feature.attributes.status = "open"; - feature.attributes.id = data; + feature.attributes = data.properties; map.noteLayer.drawFeature(feature); diff --git a/app/assets/javascripts/templates/notes/new.jst.ejs b/app/assets/javascripts/templates/notes/new.jst.ejs index 9c82a60a4..9295ce873 100644 --- a/app/assets/javascripts/templates/notes/new.jst.ejs +++ b/app/assets/javascripts/templates/notes/new.jst.ejs @@ -5,7 +5,7 @@
- +
diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 39e54c7f6..248b5a0b6 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -28,7 +28,7 @@