summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/templates/filterbox.html
diff options
context:
space:
mode:
authorSimon Rettberg2017-12-16 18:33:16 +0100
committerSimon Rettberg2017-12-16 18:33:16 +0100
commitcd55ead3e2810e209b726faca12fa749f6875d0f (patch)
tree94b2f29b023e8a0c5100e1d06c974c3c04f890fd /modules-available/statistics/templates/filterbox.html
parentMerge branch 'permission-manager' of openslx.org:openslx-ng/slx-admin into pe... (diff)
downloadslx-admin-cd55ead3e2810e209b726faca12fa749f6875d0f.tar.gz
slx-admin-cd55ead3e2810e209b726faca12fa749f6875d0f.tar.xz
slx-admin-cd55ead3e2810e209b726faca12fa749f6875d0f.zip
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.
Diffstat (limited to 'modules-available/statistics/templates/filterbox.html')
-rw-r--r--modules-available/statistics/templates/filterbox.html7
1 files changed, 4 insertions, 3 deletions
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;}
}