Popups in the reports as we've always promised.

This commit is contained in:
James Cole
2015-03-04 20:47:00 +01:00
parent a349aac8a4
commit 8ad1ede0c5
8 changed files with 207 additions and 46 deletions

View File

@@ -6,4 +6,24 @@ if (typeof(google) != 'undefined') {
googleStackedColumnChart('chart/budgets/spending/' + year, 'budgets');
}
}
$(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;
}