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"
|
message_class = "danger"
|
||||||
return {"message": message, "class": message_class}
|
return {"message": message, "class": message_class}
|
||||||
sentiment_method = request.POST["sentiment-method"]
|
sentiment_method = request.POST["sentiment-method"]
|
||||||
range_query_compare = {
|
range_query_compare = {"range": {"sentiment": {}}}
|
||||||
"range": {
|
|
||||||
"sentiment": {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
range_query_precise = {
|
range_query_precise = {
|
||||||
"match": {
|
"match": {
|
||||||
"sentiment": None,
|
"sentiment": None,
|
||||||
|
|
|
@ -173,21 +173,29 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<label class="radio">
|
<label class="radio button has-text-link">
|
||||||
<input type="radio" value="below" name="sentiment-method">
|
<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>
|
||||||
<label class="radio">
|
<label class="radio button has-text-link is-hidden">
|
||||||
<input type="radio" value="exact" name="sentiment-method">
|
<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>
|
||||||
<label class="radio">
|
<label class="radio button has-text-link">
|
||||||
<input type="radio" value="above" name="sentiment-method">
|
<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>
|
||||||
<label class="radio">
|
<label class="radio button has-text-link">
|
||||||
<input type="radio" value="nonzero" name="sentiment-method">
|
<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>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -257,7 +265,11 @@
|
||||||
var inputTags = document.getElementById('tags');
|
var inputTags = document.getElementById('tags');
|
||||||
new BulmaTagsInput(inputTags);
|
new BulmaTagsInput(inputTags);
|
||||||
inputTags.BulmaTagsInput().on('before.add', function(item) {
|
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];
|
var field = spl[0];
|
||||||
try {
|
try {
|
||||||
var value = JSON.parse(spl[1]);
|
var value = JSON.parse(spl[1]);
|
||||||
|
|
Loading…
Reference in New Issue