mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-16 18:25:00 -06:00
Replaced success() with done ()
This commit is contained in:
parent
7343304284
commit
fb119cc208
@ -62,7 +62,7 @@ function updateBudgetedAmounts(e) {
|
|||||||
drawBudgetedBar();
|
drawBudgetedBar();
|
||||||
|
|
||||||
// send a post to Firefly to update the amount:
|
// send a post to Firefly to update the amount:
|
||||||
$.post('budgets/amount/' + id, {amount: value, _token: token}).success(function (data) {
|
$.post('budgets/amount/' + id, {amount: value, _token: token}).done(function (data) {
|
||||||
// update the link if relevant:
|
// update the link if relevant:
|
||||||
if (data.repetition > 0) {
|
if (data.repetition > 0) {
|
||||||
$('.budget-link[data-id="' + id + '"]').attr('href', 'budgets/show/' + id + '/' + data.repetition);
|
$('.budget-link[data-id="' + id + '"]').attr('href', 'budgets/show/' + id + '/' + data.repetition);
|
||||||
|
@ -136,7 +136,7 @@ var defaultStackedColumnOptions = {
|
|||||||
*/
|
*/
|
||||||
function lineChart(URL, container, options) {
|
function lineChart(URL, container, options) {
|
||||||
"use strict";
|
"use strict";
|
||||||
$.getJSON(URL).success(function (data) {
|
$.getJSON(URL).done(function (data) {
|
||||||
var ctx = document.getElementById(container).getContext("2d");
|
var ctx = document.getElementById(container).getContext("2d");
|
||||||
var newData = {};
|
var newData = {};
|
||||||
newData.datasets = [];
|
newData.datasets = [];
|
||||||
@ -170,7 +170,7 @@ function lineChart(URL, container, options) {
|
|||||||
function areaChart(URL, container, options) {
|
function areaChart(URL, container, options) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
$.getJSON(URL).success(function (data) {
|
$.getJSON(URL).done(function (data) {
|
||||||
var ctx = document.getElementById(container).getContext("2d");
|
var ctx = document.getElementById(container).getContext("2d");
|
||||||
var newData = {};
|
var newData = {};
|
||||||
newData.datasets = [];
|
newData.datasets = [];
|
||||||
@ -206,7 +206,7 @@ function columnChart(URL, container, options) {
|
|||||||
|
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
$.getJSON(URL).success(function (data) {
|
$.getJSON(URL).done(function (data) {
|
||||||
|
|
||||||
var result = true;
|
var result = true;
|
||||||
if (options.beforeDraw) {
|
if (options.beforeDraw) {
|
||||||
@ -252,7 +252,7 @@ function stackedColumnChart(URL, container, options) {
|
|||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
|
|
||||||
$.getJSON(URL).success(function (data) {
|
$.getJSON(URL).done(function (data) {
|
||||||
|
|
||||||
var result = true;
|
var result = true;
|
||||||
if (options.beforeDraw) {
|
if (options.beforeDraw) {
|
||||||
@ -295,7 +295,7 @@ function stackedColumnChart(URL, container, options) {
|
|||||||
function pieChart(URL, container, options) {
|
function pieChart(URL, container, options) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
$.getJSON(URL).success(function (data) {
|
$.getJSON(URL).done(function (data) {
|
||||||
|
|
||||||
var ctx = document.getElementById(container).getContext("2d");
|
var ctx = document.getElementById(container).getContext("2d");
|
||||||
new Chart(ctx).Pie(data, defaultPieOptions);
|
new Chart(ctx).Pie(data, defaultPieOptions);
|
||||||
|
@ -47,7 +47,7 @@ $(function () {
|
|||||||
end: end.format('YYYY-MM-DD'),
|
end: end.format('YYYY-MM-DD'),
|
||||||
label: label,
|
label: label,
|
||||||
_token: token
|
_token: token
|
||||||
}).success(function () {
|
}).done(function () {
|
||||||
console.log('Succesfully sent new date range.');
|
console.log('Succesfully sent new date range.');
|
||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
|
@ -16,7 +16,7 @@ function showHelp(e) {
|
|||||||
$('#helpTitle').html('Please hold...');
|
$('#helpTitle').html('Please hold...');
|
||||||
|
|
||||||
$('#helpModal').modal('show');
|
$('#helpModal').modal('show');
|
||||||
$.getJSON('help/' + encodeURI(route)).success(function (data) {
|
$.getJSON('help/' + encodeURI(route)).done(function (data) {
|
||||||
$('#helpBody').html(data.text);
|
$('#helpBody').html(data.text);
|
||||||
$('#helpTitle').html(data.title);
|
$('#helpTitle').html(data.title);
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
|
@ -5,7 +5,7 @@ $(function () {
|
|||||||
// do chart JS stuff.
|
// do chart JS stuff.
|
||||||
drawChart();
|
drawChart();
|
||||||
if (showTour) {
|
if (showTour) {
|
||||||
$.getJSON('json/tour').success(function (data) {
|
$.getJSON('json/tour').done(function (data) {
|
||||||
var tour = new Tour(
|
var tour = new Tour(
|
||||||
{
|
{
|
||||||
steps: data.steps,
|
steps: data.steps,
|
||||||
@ -70,7 +70,7 @@ function getBoxAmounts() {
|
|||||||
var boxes = ['in', 'out', 'bills-unpaid', 'bills-paid'];
|
var boxes = ['in', 'out', 'bills-unpaid', 'bills-paid'];
|
||||||
for (var x in boxes) {
|
for (var x in boxes) {
|
||||||
var box = boxes[x];
|
var box = boxes[x];
|
||||||
$.getJSON('json/box/' + box).success(putData).fail(failData);
|
$.getJSON('json/box/' + box).done(putData).fail(failData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ function stopSorting() {
|
|||||||
var id = holder.data('id');
|
var id = holder.data('id');
|
||||||
order.push(id);
|
order.push(id);
|
||||||
});
|
});
|
||||||
$.post('/piggy-banks/sort', {_token: token, order: order}).success(function () {
|
$.post('/piggy-banks/sort', {_token: token, order: order}).done(function () {
|
||||||
$('.loadSpin').removeClass('fa fa-refresh fa-spin');
|
$('.loadSpin').removeClass('fa fa-refresh fa-spin');
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -126,7 +126,7 @@ function openModal(e) {
|
|||||||
var target = $(e.target).parent();
|
var target = $(e.target).parent();
|
||||||
var URL = target.attr('href');
|
var URL = target.attr('href');
|
||||||
|
|
||||||
$.get(URL).success(function (data) {
|
$.get(URL).done(function (data) {
|
||||||
$('#defaultModal').empty().html(data).modal('show');
|
$('#defaultModal').empty().html(data).modal('show');
|
||||||
|
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
|
@ -20,7 +20,7 @@ function addNewTrigger() {
|
|||||||
"use strict";
|
"use strict";
|
||||||
triggerCount++;
|
triggerCount++;
|
||||||
|
|
||||||
$.getJSON('json/trigger', {count: triggerCount}).success(function (data) {
|
$.getJSON('json/trigger', {count: triggerCount}).done(function (data) {
|
||||||
//console.log(data.html);
|
//console.log(data.html);
|
||||||
$('tbody.rule-trigger-tbody').append(data.html);
|
$('tbody.rule-trigger-tbody').append(data.html);
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
@ -32,7 +32,7 @@ function addNewAction() {
|
|||||||
"use strict";
|
"use strict";
|
||||||
actionCount++;
|
actionCount++;
|
||||||
|
|
||||||
$.getJSON('json/action', {count: actionCount}).success(function (data) {
|
$.getJSON('json/action', {count: actionCount}).done(function (data) {
|
||||||
//console.log(data.html);
|
//console.log(data.html);
|
||||||
$('tbody.rule-action-tbody').append(data.html);
|
$('tbody.rule-action-tbody').append(data.html);
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
if ($('input[name="expense_account"]').length > 0) {
|
if ($('input[name="expense_account"]').length > 0) {
|
||||||
$.getJSON('json/expense-accounts').success(function (data) {
|
$.getJSON('json/expense-accounts').done(function (data) {
|
||||||
$('input[name="expense_account"]').typeahead({source: data});
|
$('input[name="expense_account"]').typeahead({source: data});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('input[name="tags"]').length > 0) {
|
if ($('input[name="tags"]').length > 0) {
|
||||||
$.getJSON('json/tags').success(function (data) {
|
$.getJSON('json/tags').done(function (data) {
|
||||||
var opt = {
|
var opt = {
|
||||||
typeahead: {
|
typeahead: {
|
||||||
source: data
|
source: data
|
||||||
@ -28,19 +28,19 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($('input[name="revenue_account"]').length > 0) {
|
if ($('input[name="revenue_account"]').length > 0) {
|
||||||
$.getJSON('json/revenue-accounts').success(function (data) {
|
$.getJSON('json/revenue-accounts').done(function (data) {
|
||||||
$('input[name="revenue_account"]').typeahead({source: data});
|
$('input[name="revenue_account"]').typeahead({source: data});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('input[name="description"]').length > 0 && what !== undefined) {
|
if ($('input[name="description"]').length > 0 && what !== undefined) {
|
||||||
$.getJSON('json/transaction-journals/' + what).success(function (data) {
|
$.getJSON('json/transaction-journals/' + what).done(function (data) {
|
||||||
$('input[name="description"]').typeahead({source: data});
|
$('input[name="description"]').typeahead({source: data});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('input[name="category"]').length > 0) {
|
if ($('input[name="category"]').length > 0) {
|
||||||
$.getJSON('json/categories').success(function (data) {
|
$.getJSON('json/categories').done(function (data) {
|
||||||
$('input[name="category"]').typeahead({source: data});
|
$('input[name="category"]').typeahead({source: data});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user