mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Update js [skip ci]
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
/* globals $, googleLineChart, token */
|
||||
|
||||
// Return a helper with preserved width of cells
|
||||
var fixHelper = function(e, tr) {
|
||||
var fixHelper = function (e, tr) {
|
||||
"use strict";
|
||||
var $originals = tr.children();
|
||||
var $helper = tr.clone();
|
||||
$helper.children().each(function (index) {
|
||||
@@ -10,6 +13,7 @@ var fixHelper = function(e, tr) {
|
||||
};
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
$('.addMoney').on('click', addMoney);
|
||||
$('.removeMoney').on('click', removeMoney);
|
||||
|
||||
@@ -43,8 +47,8 @@ $(function () {
|
||||
});
|
||||
|
||||
|
||||
|
||||
function addMoney(e) {
|
||||
"use strict";
|
||||
var pigID = parseInt($(e.target).data('id'));
|
||||
$('#moneyManagementModal').empty().load('piggy-banks/add/' + pigID, function () {
|
||||
$('#moneyManagementModal').modal('show');
|
||||
@@ -54,6 +58,7 @@ function addMoney(e) {
|
||||
}
|
||||
|
||||
function removeMoney(e) {
|
||||
"use strict";
|
||||
var pigID = parseInt($(e.target).data('id'));
|
||||
$('#moneyManagementModal').empty().load('piggy-banks/remove/' + pigID, function () {
|
||||
$('#moneyManagementModal').modal('show');
|
||||
@@ -62,15 +67,15 @@ function removeMoney(e) {
|
||||
return false;
|
||||
}
|
||||
function stopSorting() {
|
||||
"use strict";
|
||||
$('.loadSpin').addClass('fa fa-refresh fa-spin');
|
||||
var order = [];
|
||||
$.each($('#sortable>tbody>tr'), function(i,v) {
|
||||
$.each($('#sortable>tbody>tr'), function (i, v) {
|
||||
var holder = $(v);
|
||||
var id = holder.data('id');
|
||||
order.push(id);
|
||||
});
|
||||
$.post('/piggy-banks/sort',{_token: token, order: order}).success(function(data) {
|
||||
"use strict";
|
||||
$.post('/piggy-banks/sort', {_token: token, order: order}).success(function () {
|
||||
$('.loadSpin').removeClass('fa fa-refresh fa-spin');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user