Fix tag parsing and theme all radio buttons
This commit is contained in:
parent
52ce55b2e9
commit
d858f79f7e
|
@ -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,
|
||||
|
|
|
@ -173,21 +173,29 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="control">
|
||||
<label class="radio">
|
||||
<label class="radio button has-text-link">
|
||||
<input type="radio" value="below" name="sentiment-method">
|
||||
Below
|
||||
<span class="icon" data-tooltip="Below">
|
||||
<i class="fa-solid fa-face-frown"></i>
|
||||
</span>
|
||||
</label>
|
||||
<label class="radio">
|
||||
<label class="radio button has-text-link is-hidden">
|
||||
<input type="radio" value="exact" name="sentiment-method">
|
||||
Exact
|
||||
<span class="icon" data-tooltip="Exact">
|
||||
<i class="fa-solid fa-face-smile"></i>
|
||||
</span>
|
||||
</label>
|
||||
<label class="radio">
|
||||
<label class="radio button has-text-link">
|
||||
<input type="radio" value="above" name="sentiment-method">
|
||||
Above
|
||||
<span class="icon" data-tooltip="Above">
|
||||
<i class="fa-solid fa-face-smile"></i>
|
||||
</span>
|
||||
</label>
|
||||
<label class="radio">
|
||||
<label class="radio button has-text-link">
|
||||
<input type="radio" value="nonzero" name="sentiment-method">
|
||||
Nonzero
|
||||
<span class="icon" data-tooltip="Nonzero">
|
||||
<i class="fa-solid fa-face-meh-blank"></i>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue