Clean up code.

This commit is contained in:
James Cole
2020-10-24 07:40:56 +02:00
parent 048e5eeb31
commit ab4bcd3703
20 changed files with 126 additions and 245 deletions

View File

@@ -63,7 +63,6 @@ function stopSorting() {
"use strict";
$.each($('#sortable-table>tbody>tr.sortable-object'), function (i, v) {
var holder = $(v);
var parentBody = holder.parent();
var position = parseInt(holder.data('position'));
var originalOrder = parseInt(holder.data('order'));
var id = holder.data('id');

View File

@@ -45,12 +45,9 @@ var colourSet = [
];
var fillColors = [];
var strokePointHighColors = [];
for (var i = 0; i < colourSet.length; i++) {
fillColors.push("rgba(" + colourSet[i][0] + ", " + colourSet[i][1] + ", " + colourSet[i][2] + ", 0.5)");
strokePointHighColors.push("rgba(" + colourSet[i][0] + ", " + colourSet[i][1] + ", " + colourSet[i][2] + ", 0.9)");
}
Chart.defaults.global.legend.display = false;

View File

@@ -108,7 +108,6 @@ function getBillsBox() {
var unpaid = [];
var paid = [];
for (key in data) {
var row = data[key];
//console.log(key);
if (key.substr(0, 16) === 'bills-unpaid-in-') {
// only when less than 3.

View File

@@ -51,7 +51,7 @@ $(function () {
);
// set report type from cookie, if any:
if (!(readCookie('report-type') === null)) {
if (null !== readCookie('report-type')) {
$('select[name="report_type"]').val(readCookie('report-type'));
}

View File

@@ -252,9 +252,6 @@ function updateActionInput(selectList) {
createAutoComplete(inputResult, 'api/v1/autocomplete/transactions');
break;
case 'set_source_account':
console.log('Select list value is ' + selectList.val() + ', so input needs auto complete.');
createAutoComplete(inputResult, 'api/v1/autocomplete/accounts');
break;
case 'set_destination_account':
console.log('Select list value is ' + selectList.val() + ', so input needs auto complete.');
createAutoComplete(inputResult, 'api/v1/autocomplete/accounts');