Fix list data not being replaced when switching lists

This commit is contained in:
Paul van Tilburg 2017-12-29 19:55:28 +01:00
parent b63019bfac
commit 5ffd7bcd62
1 changed files with 3 additions and 2 deletions

View File

@ -49,6 +49,7 @@ function triggerSelect(listId) {
url: '/lists/' + listId,
headers: { 'Accept': 'text/html' }
}).done(function(html) { $('#listHtml').html(html); });
$.ajax({
url: '/lists/' + listId,
headers: { 'Accept': 'application/json' }
@ -61,7 +62,7 @@ function triggerSelect(listId) {
mtime = new Date(list.mtime.secs_since_epoch * 1000);
$('#listUpdatedAt').text('Laaste aanpassing op ' +
mtime.toLocaleDateString("nl") + ' om ' + mtime.toLocaleTimeString("nl"));
$('#listData').html(list.data);
$('#listData').val(list.data);
$('#editButton').show();
});
}
@ -95,7 +96,7 @@ function saveUpdate(listId, data) {
mtime = new Date(list.mtime.secs_since_epoch * 1000);
$('#listUpdatedAt').text('Laaste aanpassing op ' +
mtime.toLocaleDateString("nl") + ' om ' + mtime.toLocaleTimeString("nl"));
$('#listData').html(list.data);
$('#listData').val(list.data);
});
}