From 513bec8044e56bf669d1b2e7ef3a1c4b53362aff Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 14 Oct 2012 14:04:59 +0100 Subject: [PATCH] Set attributes on newly created notes --- app/assets/javascripts/index/notes.js.erb | 3 +-- app/assets/javascripts/templates/notes/new.jst.ejs | 2 +- app/views/site/index.html.erb | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) 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 @@