commit property name changes back to client side state with bugs fixed

This commit is contained in:
Sanj 2012-02-22 18:17:09 +05:30
parent efbe97fae4
commit 484f549783

View File

@ -195,7 +195,7 @@ var API_BASE = "/1.0/",
var $lon_input = $('<input />').attr("type", "hidden").val(lon).attr("id", "lon").appendTo($form); var $lon_input = $('<input />').attr("type", "hidden").val(lon).attr("id", "lon").appendTo($form);
$form.submit(function(e) { $form.submit(function(e) {
e.preventDefault(); e.preventDefault();
var oldProps = $('.selectedStopItem').data("properties"); var oldProps = $('.selectedStop').data("properties");
var geojson = { var geojson = {
'type': 'Feature', 'type': 'Feature',
@ -210,7 +210,7 @@ var API_BASE = "/1.0/",
} }
}; };
var props = $.extend(oldProps, geojson.properties); var props = $.extend(oldProps, geojson.properties);
$('.selectedStopItem').data("properties", props); $('.selectedStop').data("properties", props);
var geojsonString = JSON.stringify(geojson); var geojsonString = JSON.stringify(geojson);
//console.log(geojsonString); //console.log(geojsonString);
var url = API_BASE + "stop/" + stop.slug + "?srid=3857"; var url = API_BASE + "stop/" + stop.slug + "?srid=3857";