2015-02-23 13:25:48 -06:00
|
|
|
if (typeof(google) != 'undefined') {
|
|
|
|
google.setOnLoadCallback(drawChart);
|
|
|
|
function drawChart() {
|
|
|
|
googleColumnChart('chart/reports/income-expenses/' + year, 'income-expenses-chart');
|
|
|
|
googleColumnChart('chart/reports/income-expenses-sum/' + year, 'income-expenses-sum-chart')
|
|
|
|
|
|
|
|
googleStackedColumnChart('chart/budgets/spending/' + year, 'budgets');
|
|
|
|
}
|
2015-03-04 13:47:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
$('.openModal').on('click', openModal);
|
|
|
|
});
|
|
|
|
|
|
|
|
function openModal(e) {
|
|
|
|
"use strict";
|
|
|
|
var target = $(e.target).parent();
|
|
|
|
var URL = target.attr('href');
|
|
|
|
|
|
|
|
$.get(URL).success(function (data) {
|
|
|
|
$('#defaultModal').empty().html(data).modal('show');
|
|
|
|
|
|
|
|
}).fail(function () {
|
|
|
|
alert('Could not load data.');
|
|
|
|
});
|
|
|
|
|
|
|
|
return false;
|
2015-02-23 13:25:48 -06:00
|
|
|
}
|