Updated budget view.

This commit is contained in:
James Cole
2017-06-06 20:35:39 +02:00
parent 6058ccff0d
commit 9d5d1c0a41
4 changed files with 56 additions and 12 deletions

View File

@@ -8,7 +8,7 @@
* See the LICENSE file for details.
*/
/** global: spent, budgeted, available, currencySymbol */
/** global: spent, budgeted, available, currencySymbol, budgetIndexURI */
function drawSpentBar() {
"use strict";
@@ -99,6 +99,15 @@ $(function () {
*/
$('input[type="number"]').on('input', updateBudgetedAmounts);
//
$('.selectPeriod').change(function (e) {
var sel = $(e.target).val();
if (sel !== "x") {
var newURI = budgetIndexURI.replace("REPLACE", sel);
window.location.assign(newURI);
}
});
});
function updateIncome() {