Skip to content
Snippets Groups Projects
Unverified Commit 0bcfd098 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

auto-refresh timeline

parent 6277cdd9
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,15 @@ function tvly_update_public() {
setTimeout(tvly_update_public, 5000);
});
}
function tvly_update_timeline() {
$.get('/timeline/in-transit', {ajax: 1}, function(data) {
$('.timeline-in-transit').html(data);
setTimeout(tvly_update_timeline, 60000);
}).fail(function() {
$('.sync-failed-marker').css('display', 'block');
setTimeout(tvly_update_timeline, 10000);
});
}
function tvly_journey_progress() {
var now = Date.now() / 1000;
var progress = 0;
......@@ -277,6 +286,9 @@ $(document).ready(function() {
setTimeout(tvly_update_public, 40000);
setTimeout(tvly_journey_progress, 5000);
}
if ($('.timeline-in-transit .autorefresh').length) {
setTimeout(tvly_update_timeline, 60000);
}
$('a[href]').click(function() {
$('nav .preloader-wrapper').addClass('active');
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment