Implement updating the list while editing it

This commit is contained in:
Paul van Tilburg 2017-12-27 21:47:23 +01:00
parent 85e25a9b5c
commit 787839e36f
1 changed files with 10 additions and 0 deletions

View File

@ -68,6 +68,16 @@ function triggerSelect(listId) {
function triggerUpdate(listId, data) {
console.debug('Triggering HTML update for list ' + listId + ', data: ' + data);
listCopy = Object.assign({}, curList);
listCopy.data = data;
$.ajax({
method: 'POST',
url: '/lists',
headers: { 'Accept': 'text/html',
'Content-Type': 'application/json' },
data: JSON.stringify(listCopy)
}).done(function(html) { $("#listHtml").html(html) });
}
function saveUpdate(listId, data) {