mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-21 02:31:19 +00:00
Code cleanup for scrutinizer.
This commit is contained in:
5
public/js/ff/accounts/reconcile.js
vendored
5
public/js/ff/accounts/reconcile.js
vendored
@@ -18,6 +18,8 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: overviewUri, transactionsUri, indexUri,accounting */
|
||||
|
||||
var balanceDifference = 0;
|
||||
var difference = 0;
|
||||
var selectedAmount = 0;
|
||||
@@ -101,14 +103,11 @@ function storeReconcile() {
|
||||
function checkReconciledBox(e) {
|
||||
var el = $(e.target);
|
||||
var amount = parseFloat(el.val());
|
||||
console.log('Amount is ' + amount);
|
||||
// if checked, add to selected amount
|
||||
if (el.prop('checked') === true && el.data('younger') === false) {
|
||||
console.log("Sum is: " + selectedAmount + " - " + amount + " = " + (selectedAmount - amount));
|
||||
selectedAmount = selectedAmount - amount;
|
||||
}
|
||||
if (el.prop('checked') === false && el.data('younger') === false) {
|
||||
console.log("Sum is: " + selectedAmount + " + " + amount + " = " + (selectedAmount + amount));
|
||||
selectedAmount = selectedAmount + amount;
|
||||
}
|
||||
difference = balanceDifference - selectedAmount;
|
||||
|
||||
6
public/js/ff/budgets/index.js
vendored
6
public/js/ff/budgets/index.js
vendored
@@ -18,8 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */
|
||||
|
||||
/** global: infoIncomeUri, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -150,9 +149,6 @@ function updateBudgetedAmounts(e) {
|
||||
link.attr('href', 'budgets/show/' + id + '/' + data.limit);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
4
public/js/ff/charts.js
vendored
4
public/js/ff/charts.js
vendored
@@ -17,7 +17,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart */
|
||||
/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart, todayText */
|
||||
var allCharts = {};
|
||||
|
||||
|
||||
@@ -131,7 +131,6 @@ function lineChart(URI, container) {
|
||||
|
||||
function lineChartWithDay(URI, container, today) {
|
||||
"use strict";
|
||||
console.log('in lineChartWithDay');
|
||||
var colorData = true;
|
||||
var options = $.extend(true, {}, defaultChartOptions);
|
||||
var chartType = 'line';
|
||||
@@ -342,7 +341,6 @@ function drawAChart(URI, container, chartType, options, colorData, today) {
|
||||
};
|
||||
if (today >= 0) {
|
||||
chartOpts.lineAtIndex.push(today - 1);
|
||||
console.log('push opt');
|
||||
}
|
||||
allCharts[container] = new Chart(ctx, chartOpts);
|
||||
}
|
||||
|
||||
2
public/js/ff/firefly.js
vendored
2
public/js/ff/firefly.js
vendored
@@ -17,7 +17,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** global: moment, 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 */
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
2
public/js/ff/index.js
vendored
2
public/js/ff/index.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: accountFrontpageUri, token, billCount, accountExpenseUri, accountRevenueUri */
|
||||
/** global: accountFrontpageUri, today, piggyInfoUri, token, billCount, accountExpenseUri, accountRevenueUri */
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
2
public/js/ff/intro/intro.js
vendored
2
public/js/ff/intro/intro.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: routeForTour, routeStepsUri, routeForFinishedTour, forceDemoOff */
|
||||
/** global: routeForTour, token, routeStepsUri, routeForFinishedTour, forceDemoOff */
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
2
public/js/ff/tags/show.js
vendored
2
public/js/ff/tags/show.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: zoomLevel, latitude, longitude, google, doPlaceMarker */
|
||||
/** global: zoomLevel, latitude, longitude, L, mapboxToken, doPlaceMarker */
|
||||
|
||||
/*
|
||||
Some vars as prep for the map:
|
||||
|
||||
23
public/js/ff/transactions/list.js
vendored
23
public/js/ff/transactions/list.js
vendored
@@ -156,29 +156,6 @@ function countChecked() {
|
||||
}
|
||||
}
|
||||
|
||||
function getAmounts() {
|
||||
$('.mass_reconcile span').html(reconcile_selected_txt + ' (<i class="fa fa-spinner fa-spin "></i>)');
|
||||
var checked = $('.select_all_single:checked');
|
||||
var ids = [];
|
||||
$.each(checked, function (i, v) {
|
||||
ids.push(parseInt($(v).data('transaction')));
|
||||
});
|
||||
|
||||
// go to specially crafted URL:
|
||||
var bases = document.getElementsByTagName('base');
|
||||
var baseHref = null;
|
||||
|
||||
if (bases.length > 0) {
|
||||
baseHref = bases[0].href;
|
||||
}
|
||||
|
||||
$.getJSON(baseHref + 'json/transactions/amount', {transactions: ids}).done(function (data) {
|
||||
$('.mass_reconcile span').text(reconcile_selected_txt + ' (' + data.amounts + ')');
|
||||
console.log(data);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user