Event Items now saved using JSON rather than an AJAX request

This commit is contained in:
Tom Price
2014-12-04 22:18:53 +00:00
parent 2390429775
commit 697bbb9479
6 changed files with 94 additions and 9 deletions

View File

@@ -1,3 +1,10 @@
function setupItemTable(items_json) {
objectitems = JSON.parse(items_json)
$.each(objectitems, function(key, val) {
objectitems[key] = JSON.parse(val);
})
}
function updatePrices() {
var sum = 0;
$('.sub-total').each(function() {
@@ -122,7 +129,6 @@ $("#item-table tbody").sortable({
pk = $('#'+value).data('pk');
itemorder[key] = pk;
});
data = JSON.stringify(itemorder);
$.post($('#item-table').data('orderurl'), data);
}
});