From cd55ead3e2810e209b726faca12fa749f6875d0f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Sat, 16 Dec 2017 18:33:16 +0100 Subject: Fix A LOT of type problems, logic flaws, uninitialized variables etc. Most of them were found by phpstorm, so I put in some time and went through the list, fixing quite a bunch of them. --- modules-available/statistics/templates/filterbox.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules-available/statistics/templates/filterbox.html') diff --git a/modules-available/statistics/templates/filterbox.html b/modules-available/statistics/templates/filterbox.html index 31daabc6..32464031 100644 --- a/modules-available/statistics/templates/filterbox.html +++ b/modules-available/statistics/templates/filterbox.html @@ -105,6 +105,7 @@ var slxFilterNames = { slxLocations = {{{locations}}}; var slxFilterDel = '{{delimiter}}'; +var $modal, $queryForm; document.addEventListener("DOMContentLoaded", function () { @@ -217,7 +218,7 @@ function popupFilter(field) { function addFilterFromForm() { var argument1 = $('#argumentInput').val(); var argument2 = $('#argumentSelect').val(); - var argument = argument1 == '' ? argument2 : argument1; + var argument = argument1 ? argument1 : argument2; var col = $('#columnSelect').val(); var op = $('#operatorSelect').val(); @@ -246,8 +247,8 @@ function toggleSort(field) { /* equal sign should always be first, the rest doesn't matter*/ function myOpSort(a,b) { - if (a == '=') { return -1; } - else if (a == b) {return 0} + if (a === '=') { return -1; } + else if (a === b) {return 0} else { return 1;} } -- cgit v1.2.3-55-g7522