Permalink
Browse files

Correct JS for broken links when AJAX updating

  • Loading branch information...
1 parent 3a72a7c commit 45be2624e7e7a615047fe014a3e82e57e778ddbd @cnorthwood cnorthwood committed Jul 7, 2011
@@ -220,6 +220,8 @@ function rebuildRTI(elem, metadata){
var service = metadata.services[i]
if (service.route) {
var route_link = '<a href="service?route=' + encodeURIComponent(service.service) + '">' + service.service + '</a>'
+ } else if (service.journey) {
+ var route_link = '<a href="service?journey=' + service.journey.id + '">' + service.service + '</a>'
} else {
var route_link = service.service
}
@@ -73,6 +73,8 @@ function refreshTransport(data){
tr = tbody.find('tr:last')
if (service.route) {
var route_link = '<a href="' + entity._url + 'service?route=' + encodeURIComponent(service.service) + '" class="subtle-link">' + service.service + '</a>'
+ } else if (service.journey) {
+ var route_link = '<a href="' + entity._url + 'service?journey=' + service.journey.id + '" class="subtle-link">' + service.service + '</a>'
} else {
var route_link = service.service
}

0 comments on commit 45be262

Please sign in to comment.