From 40d1528895d9826e2dd525c8def33b395b70c1f2 Mon Sep 17 00:00:00 2001 From: Sanj Date: Thu, 23 Feb 2012 19:21:59 +0530 Subject: [PATCH] add direction to stop display --- chaloBEST/mumbai/models.py | 1 + chaloBEST/static/js/editstops.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/chaloBEST/mumbai/models.py b/chaloBEST/mumbai/models.py index b6fb7ec..9a75db7 100644 --- a/chaloBEST/mumbai/models.py +++ b/chaloBEST/mumbai/models.py @@ -117,6 +117,7 @@ class Stop(models.Model): 'road': self.road.name, 'area': self.area.name, 'name_mr': self.name_mr, + 'direction': self.dbdirection, 'routes': ", ".join([r.route.alias for r in RouteDetail.objects.filter(stop=self)]), 'alternative_names': ", ".join([a.name for a in self.alt_names.all().filter(typ='common')]) } diff --git a/chaloBEST/static/js/editstops.js b/chaloBEST/static/js/editstops.js index 45bc6fa..4772539 100644 --- a/chaloBEST/static/js/editstops.js +++ b/chaloBEST/static/js/editstops.js @@ -164,6 +164,7 @@ var API_BASE = "/1.0/", var $displayName = $('

').text(stop.display_name).appendTo($div); var $slug = $('
').addClass("stopSlug").text(stop.slug).appendTo($div); var $road = $("
").addClass("stopRoad").text("Road: " + stop.road).appendTo($div); + var $direction = $("
").addClass("stopDirection").text("Direction: " + stop.direction).appendTo($div); var $routes = $('
').text("Routes: " + stop.routes).appendTo($div); // var $formLabel = $("
").text("Edit:").appendTo($div); var $form = $('
').attr("id", "stopForm").appendTo($div); @@ -296,6 +297,8 @@ var API_BASE = "/1.0/", clickout: false, toggle: true }); + + //map.addControl(new OpenLayers.Control.ZoomPanel()); map.addControl(mapControl); mapControl.activate();