Fixed a bug where limits and limit repetitions would not be updated and/or created because of double post calls and missing events.

This commit is contained in:
James Cole
2014-11-17 21:50:11 +01:00
parent 15e99bd672
commit 4f4e6fac16
4 changed files with 70 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
$(function () {
updateRanges();
$('input[type="range"]').change(updateSingleRange);
//$('input[type="range"]').change(updateSingleRange);
$('input[type="range"]').on('input', updateSingleRange);
$('input[type="number"]').on('change', updateSingleRange);
//$('input[type="number"]').on('change', updateSingleRange);
$('input[type="number"]').on('input', updateSingleRange);
$('.updateIncome').on('click', updateIncome);
@@ -56,6 +56,7 @@ function updateSingleRange(e) {
// send a post to Firefly to update the amount:
console.log('Value is: ' + value);
console.log('POST! with ID ' + id + ' AND value ' + value);
$.post('budgets/amount/' + id, {amount: value}).success(function (data) {
console.log('Budget ' + data.name + ' updated!');
// update the link if relevant: