From fde4d0f88c1d026559e5519f076026c251c202cd Mon Sep 17 00:00:00 2001 From: Subhodip Biswas Date: Fri, 4 May 2012 09:24:50 +0530 Subject: [PATCH] First instance of Buseditor added --- chaloBEST/mumbai/views.py | 3 +++ chaloBEST/static/js/editstops.js | 4 +++- chaloBEST/urls.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/chaloBEST/mumbai/views.py b/chaloBEST/mumbai/views.py index 61e5c5b..fbb0bc9 100644 --- a/chaloBEST/mumbai/views.py +++ b/chaloBEST/mumbai/views.py @@ -42,6 +42,9 @@ def editstops(request): context = RequestContext(request, {}) return render_to_response("editstops.html", context) +def buseditor(request): + context = RequestContext(request, {}) + return render_to_response("buseditor.html", context) def stats(request): total_stops_left = Stop.objects.filter(point=None).count() diff --git a/chaloBEST/static/js/editstops.js b/chaloBEST/static/js/editstops.js index 9b67392..b6c440b 100644 --- a/chaloBEST/static/js/editstops.js +++ b/chaloBEST/static/js/editstops.js @@ -3,6 +3,7 @@ var API_BASE = "/1.0/", (function() { $(function() { initMap(); + $('.tabButton').click(function() { if ($(this).hasClass("selected")) { return; @@ -11,6 +12,7 @@ var API_BASE = "/1.0/", var name = $that.attr("data-name"); var $listWrapper = $('#' + name); if ($that.data("loaded")) { + $.noop(); //dont load data } else { $that.data("loaded", true); @@ -313,7 +315,7 @@ var API_BASE = "/1.0/", var permalink = new OpenLayers.Control.Permalink({base: "http://www.openstreetmap.org/"}); map.addControl(permalink); $(".olControlPermalink a").attr("target","_blank").html("View in OSM"); - + alert('Not here'); } function onFeatureSelect(e) { diff --git a/chaloBEST/urls.py b/chaloBEST/urls.py index f7dde24..bff9953 100644 --- a/chaloBEST/urls.py +++ b/chaloBEST/urls.py @@ -18,6 +18,7 @@ urlpatterns = patterns('', (r'^route/(?P[a-zA-Z0-9\s\-]*?)/$', 'mumbai.views.route'), (r'^areas/$', 'mumbai.views.areas'), (r'^area/(?P.*?)/$', 'mumbai.views.area'), + (r'^buseditor/$', 'mumbai.views.buseditor'), (r'^editstops/$', 'mumbai.views.editstops'), (r'^1.0/', include('mumbai.apiurls')), # Uncomment the admin/doc line below to enable admin documentation: