Set attributes on newly created notes

This commit is contained in:
Tom Hughes 2012-10-14 14:04:59 +01:00
parent 89fc5a7fdc
commit 513bec8044
3 changed files with 3 additions and 4 deletions

View file

@ -30,8 +30,7 @@ $(document).ready(function () {
success: function (data) { success: function (data) {
map.noteSelector.unselect(feature); map.noteSelector.unselect(feature);
feature.attributes.status = "open"; feature.attributes = data.properties;
feature.attributes.id = data;
map.noteLayer.drawFeature(feature); map.noteLayer.drawFeature(feature);

View file

@ -5,7 +5,7 @@
<form action="#"> <form action="#">
<input type="hidden" name="lon"> <input type="hidden" name="lon">
<input type="hidden" name="lat"> <input type="hidden" name="lat">
<textarea name="comment" cols="40" rows="10"></textarea> <textarea name="text" cols="40" rows="10"></textarea>
<br/> <br/>
<input type="submit" name="add" value="<%- I18n.t('javascripts.notes.new.add') %>" id="note-add"> <input type="submit" name="add" value="<%- I18n.t('javascripts.notes.new.add') %>" id="note-add">
</form> </form>

View file

@ -28,7 +28,7 @@
<div id="permalink"> <div id="permalink">
<a href="/" id="permalinkanchor" class="geolink llz layers object"><%= t 'site.index.permalink' %></a> <a href="/" id="permalinkanchor" class="geolink llz layers object"><%= t 'site.index.permalink' %></a>
<a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a> <a href="/" id="shortlinkanchor"><%= t 'site.index.shortlink' %></a>
<%= link_to t("site.index.createnote"), notes_url, <%= link_to t("site.index.createnote"), notes_url(:format => :json),
:id => "createnoteanchor", :id => "createnoteanchor",
:data => { :minzoom => 12 }, :data => { :minzoom => 12 },
:title => "javascripts.site.createnote_tooltip", :title => "javascripts.site.createnote_tooltip",