Show activities on shot page.

This commit is contained in:
2016-10-18 14:50:35 +02:00
parent 612571b4b2
commit 963430e6d9
9 changed files with 85 additions and 50 deletions

View File

@@ -352,6 +352,29 @@ function task_delete(task_id, task_etag, task_delete_url) {
});
}
function load_activities(url)
{
$.get(url)
.done(function(data) {
if(console) console.log('Activities loaded OK');
$('#activities').html(data);
})
.fail(function(xhr) {
if (console) {
console.log('Error fetching activities');
console.log('XHR:', xhr);
}
$('#status-bar').text('Opening activity log failed.');
if (xhr.status) {
$('#activities').html(xhr.responseText);
} else {
$('#activities').html('<p class="text-danger">Opening activity log failed. There possibly was ' +
'an error connecting to the server. Please check your network connection and ' +
'try again.</p>');
}
});
}
$(function() {
$("a.shot-link[data-shot-id]").click(function(e) {
e.preventDefault();