mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-21 19:49:54 +00:00
Update javascript code.
This commit is contained in:
@@ -11,6 +11,12 @@
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-Token': $('meta[name="_token"]').attr('content')
|
||||
}
|
||||
});
|
||||
|
||||
// when you click on a currency, this happens:
|
||||
$('.currency-option').click(currencySelect);
|
||||
|
||||
@@ -49,18 +55,12 @@ $(function () {
|
||||
$.post(dateRangeConfig.URL, {
|
||||
start: start.format('YYYY-MM-DD'),
|
||||
end: end.format('YYYY-MM-DD'),
|
||||
label: label,
|
||||
_token: token
|
||||
label: label
|
||||
}).done(function () {
|
||||
console.log('Succesfully sent new date range [' + start.format('YYYY-MM-DD') + '-' + end.format('YYYY-MM-DD') + '].');
|
||||
window.location.reload(true);
|
||||
}).fail(function () {
|
||||
console.log('Could not send new date range.');
|
||||
alert('Could not change date range');
|
||||
|
||||
});
|
||||
|
||||
//alert('A date range was chosen: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -133,7 +133,6 @@ function triggerList(e) {
|
||||
"use strict";
|
||||
var link = $(e.target);
|
||||
var table = link.parent().parent().parent().parent();
|
||||
console.log('data-hidden = ' + table.attr('data-hidden'));
|
||||
if (table.attr('data-hidden') === 'no') {
|
||||
// hide all elements, return false.
|
||||
table.find('.overListLength').hide();
|
||||
|
Reference in New Issue
Block a user