From d858f79f7e33aa66f74663df4df2d7b64124bb8b Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 3 Aug 2022 07:20:30 +0100 Subject: [PATCH] Fix tag parsing and theme all radio buttons --- core/lib/opensearch.py | 7 +---- core/templates/ui/drilldown/drilldown.html | 30 +++++++++++++++------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/core/lib/opensearch.py b/core/lib/opensearch.py index db14d7f..c829701 100644 --- a/core/lib/opensearch.py +++ b/core/lib/opensearch.py @@ -223,12 +223,7 @@ def query_results(request, size=None): message_class = "danger" return {"message": message, "class": message_class} sentiment_method = request.POST["sentiment-method"] - range_query_compare = { - "range": { - "sentiment": { - } - } - } + range_query_compare = {"range": {"sentiment": {}}} range_query_precise = { "match": { "sentiment": None, diff --git a/core/templates/ui/drilldown/drilldown.html b/core/templates/ui/drilldown/drilldown.html index 9af17db..de4c378 100644 --- a/core/templates/ui/drilldown/drilldown.html +++ b/core/templates/ui/drilldown/drilldown.html @@ -173,21 +173,29 @@

-
@@ -257,7 +265,11 @@ var inputTags = document.getElementById('tags'); new BulmaTagsInput(inputTags); inputTags.BulmaTagsInput().on('before.add', function(item) { - var spl = item.split(": "); + if (item.includes(": ")) { + var spl = item.split(": "); + } else { + var spl = item.split(":"); + } var field = spl[0]; try { var value = JSON.parse(spl[1]);