First instance of Buseditor added

This commit is contained in:
Subhodip Biswas 2012-05-04 09:24:50 +05:30
parent e9f69f009e
commit fde4d0f88c
3 changed files with 7 additions and 1 deletions

View File

@ -42,6 +42,9 @@ def editstops(request):
context = RequestContext(request, {}) context = RequestContext(request, {})
return render_to_response("editstops.html", context) return render_to_response("editstops.html", context)
def buseditor(request):
context = RequestContext(request, {})
return render_to_response("buseditor.html", context)
def stats(request): def stats(request):
total_stops_left = Stop.objects.filter(point=None).count() total_stops_left = Stop.objects.filter(point=None).count()

View File

@ -3,6 +3,7 @@ var API_BASE = "/1.0/",
(function() { (function() {
$(function() { $(function() {
initMap(); initMap();
$('.tabButton').click(function() { $('.tabButton').click(function() {
if ($(this).hasClass("selected")) { if ($(this).hasClass("selected")) {
return; return;
@ -11,6 +12,7 @@ var API_BASE = "/1.0/",
var name = $that.attr("data-name"); var name = $that.attr("data-name");
var $listWrapper = $('#' + name); var $listWrapper = $('#' + name);
if ($that.data("loaded")) { if ($that.data("loaded")) {
$.noop(); //dont load data $.noop(); //dont load data
} else { } else {
$that.data("loaded", true); $that.data("loaded", true);
@ -313,7 +315,7 @@ var API_BASE = "/1.0/",
var permalink = new OpenLayers.Control.Permalink({base: "http://www.openstreetmap.org/"}); var permalink = new OpenLayers.Control.Permalink({base: "http://www.openstreetmap.org/"});
map.addControl(permalink); map.addControl(permalink);
$(".olControlPermalink a").attr("target","_blank").html("View in OSM"); $(".olControlPermalink a").attr("target","_blank").html("View in OSM");
alert('Not here');
} }
function onFeatureSelect(e) { function onFeatureSelect(e) {

View File

@ -18,6 +18,7 @@ urlpatterns = patterns('',
(r'^route/(?P<alias>[a-zA-Z0-9\s\-]*?)/$', 'mumbai.views.route'), (r'^route/(?P<alias>[a-zA-Z0-9\s\-]*?)/$', 'mumbai.views.route'),
(r'^areas/$', 'mumbai.views.areas'), (r'^areas/$', 'mumbai.views.areas'),
(r'^area/(?P<name>.*?)/$', 'mumbai.views.area'), (r'^area/(?P<name>.*?)/$', 'mumbai.views.area'),
(r'^buseditor/$', 'mumbai.views.buseditor'),
(r'^editstops/$', 'mumbai.views.editstops'), (r'^editstops/$', 'mumbai.views.editstops'),
(r'^1.0/', include('mumbai.apiurls')), (r'^1.0/', include('mumbai.apiurls')),
# Uncomment the admin/doc line below to enable admin documentation: # Uncomment the admin/doc line below to enable admin documentation: