From 0e9506e3262a61880b35bf8c7d31fe55f68d869c Mon Sep 17 00:00:00 2001 From: crunk Date: Mon, 21 Dec 2020 19:54:55 +0100 Subject: [PATCH] fixed small issue in vanilla js filter idea --- library/csvparser/csvparser.py | 2 +- library/static/js/script.js | 4 ++-- library/templates/menu.html | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/csvparser/csvparser.py b/library/csvparser/csvparser.py index 9e04266..15e76ae 100644 --- a/library/csvparser/csvparser.py +++ b/library/csvparser/csvparser.py @@ -26,7 +26,7 @@ def getpublications(): pubinfo = { "Title": row["Publication"], "Author": row["Author"], - "Type": row["Type"], + "Type": row["Type"].lower(), "Year": year, } publications[row["Id"]] = pubinfo diff --git a/library/static/js/script.js b/library/static/js/script.js index 138bc32..648cbbd 100644 --- a/library/static/js/script.js +++ b/library/static/js/script.js @@ -26,8 +26,8 @@ function update() { filterSelection("all") function filterSelection(c) { - var x, i; - allpublications = document.getElementsByClassName("filter"); + var i; + var allpublications = document.getElementsByClassName("filter"); if (c == "all") { for (i = 0; i < allpublications.length; i++) { addClass(allpublications[i], "show"); diff --git a/library/templates/menu.html b/library/templates/menu.html index 1190292..02261f2 100644 --- a/library/templates/menu.html +++ b/library/templates/menu.html @@ -1,6 +1,6 @@ {% block menu %} - - + +