From cb22529db892bfc85764a15b6dce82dd3aa63178 Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 5 Oct 2012 18:00:25 +0530 Subject: [PATCH] client side stop saving fixed --- chaloBEST/mumbai/apiviews.py | 2 +- chaloBEST/mumbai/static/js/editstops.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/chaloBEST/mumbai/apiviews.py b/chaloBEST/mumbai/apiviews.py index f94a635..b07c69c 100644 --- a/chaloBEST/mumbai/apiviews.py +++ b/chaloBEST/mumbai/apiviews.py @@ -88,7 +88,7 @@ def stop(request, slug): srid = int(request.GET.get("srid", 4326)) if request.POST and request.POST.has_key('geojson'): if not request.user.is_staff: - return render_to_json_response({'error': 'No permission'}) + return render_to_json_response({'errors': 'No permission'}) if not slug: stop = Stop() #FIXME: should this return an error instead? else: diff --git a/chaloBEST/mumbai/static/js/editstops.js b/chaloBEST/mumbai/static/js/editstops.js index c8c75d3..b08fb6d 100644 --- a/chaloBEST/mumbai/static/js/editstops.js +++ b/chaloBEST/mumbai/static/js/editstops.js @@ -92,7 +92,7 @@ var API_BASE = "/1.0/", stopsGeojson.features = stopsWithGeom; var currFeatures = jsonLayer.features; jsonLayer.removeFeatures(currFeatures); - console.log(stopsWithGeom); + //console.log(stopsWithGeom); if (stopsWithGeom.length !== 0) { jsonLayer.addFeatures(geojson_format.read(stopsGeojson)); var maxExtent = jsonLayer.getDataExtent(); @@ -129,6 +129,7 @@ var API_BASE = "/1.0/", var $ul = $('