fix: tag selector beautifed
This commit is contained in:
parent
b2c416f968
commit
701403b1a2
@ -387,6 +387,8 @@ def build_library_query_condition(form):
|
|||||||
break
|
break
|
||||||
if count > 0:
|
if count > 0:
|
||||||
condition.and_sub_condition(sub_cond)
|
condition.and_sub_condition(sub_cond)
|
||||||
|
else:
|
||||||
|
condition.and_equal("id", None)
|
||||||
|
|
||||||
tags = form['tags'].split(",")
|
tags = form['tags'].split(",")
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
|
@ -9,8 +9,14 @@
|
|||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
transition: 400ms;
|
transition: 400ms;
|
||||||
}
|
}
|
||||||
|
.tag-unclicked{
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
.tag-clicked{
|
.tag-clicked{
|
||||||
|
box-shadow: 2px 4px 10px #777777;
|
||||||
transform: scale(1.2);
|
transform: scale(1.2);
|
||||||
|
opacity: 1;
|
||||||
|
margin: 5px;
|
||||||
}
|
}
|
||||||
.floating-button {
|
.floating-button {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
<label class="col-sm-2 col-form-label">Tags</label>
|
<label class="col-sm-2 col-form-label">Tags</label>
|
||||||
<div class="col-sm-10" style="padding-top:5px;">
|
<div class="col-sm-10" style="padding-top:5px;">
|
||||||
{% for tag in tags_color_lookup.keys() %}
|
{% for tag in tags_color_lookup.keys() %}
|
||||||
<span id="filter-tag" class="filter-tag tag-click badge badge-{{ tags_color_lookup[tag] }}">{{ tag }}</span>
|
<span id="filter-tag" class="filter-tag tag-unclicked tag-click badge badge-{{ tags_color_lookup[tag] }}">{{ tag }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -582,7 +582,7 @@
|
|||||||
filter_radio = false;
|
filter_radio = false;
|
||||||
}else{
|
}else{
|
||||||
filter_btn_radio.removeClass("btn-secondary").addClass("btn-primary");
|
filter_btn_radio.removeClass("btn-secondary").addClass("btn-primary");
|
||||||
filter_types.push('radio')
|
filter_types.push('radio');
|
||||||
filter_radio = true;
|
filter_radio = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -596,7 +596,9 @@
|
|||||||
_tag = tag;
|
_tag = tag;
|
||||||
if (!tag.hasClass('tag-clicked')) {
|
if (!tag.hasClass('tag-clicked')) {
|
||||||
tag.addClass('tag-clicked');
|
tag.addClass('tag-clicked');
|
||||||
|
tag.removeClass('tag-unclicked');
|
||||||
} else {
|
} else {
|
||||||
|
tag.addClass('tag-umclicked');
|
||||||
tag.removeClass('tag-clicked');
|
tag.removeClass('tag-clicked');
|
||||||
}
|
}
|
||||||
updateResults();
|
updateResults();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user