mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Merge pull request #7134 from firefly-iii/fix-7131
Fix #7131 by expanding the global ajaxSetup instructions.
This commit is contained in:
2
public/v1/js/ff/accounts/index.js
vendored
2
public/v1/js/ff/accounts/index.js
vendored
@@ -88,7 +88,7 @@ function stopSorting() {
|
|||||||
//$.post('api/v1/accounts/' + id, {order: newOrder, _token: token});
|
//$.post('api/v1/accounts/' + id, {order: newOrder, _token: token});
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'api/v1/accounts/' + id,
|
url: 'api/v1/accounts/' + id,
|
||||||
data: {order: newOrder},
|
data: JSON.stringify({order: newOrder}),
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
15
public/v1/js/ff/firefly.js
vendored
15
public/v1/js/ff/firefly.js
vendored
@@ -20,9 +20,18 @@
|
|||||||
/** global: moment, token, dateRangeMeta,dateRangeConfig, accountingConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */
|
/** global: moment, token, dateRangeMeta,dateRangeConfig, accountingConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */
|
||||||
|
|
||||||
|
|
||||||
|
$.ajaxSetup({
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
configAccounting(currencySymbol);
|
configAccounting(currencySymbol);
|
||||||
|
|
||||||
// on submit of logout button:
|
// on submit of logout button:
|
||||||
@@ -37,11 +46,7 @@ $(function () {
|
|||||||
$('button[type="submit"]').prop('disabled', true);
|
$('button[type="submit"]').prop('disabled', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
$.ajaxSetup({
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// when you click on a currency, this happens:
|
// when you click on a currency, this happens:
|
||||||
$('.currency-option').on('click', currencySelect);
|
$('.currency-option').on('click', currencySelect);
|
||||||
|
Reference in New Issue
Block a user