Skip to content
Snippets Groups Projects
Commit 6c2e849c authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

add a "remove from selection" link to the "selected filter" badge

Former-commit-id: f2f98b47d22fbc69638ac08c0fd8dbfc32821f86
parent d7b27646
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.4/js/all.js"></script>
<script type="text/javascript" src="/static/Kekule.js-master/release/kekule.js?modules=chemWidget,openbabel,indigo"></script>
<script src="/static/js/ippidb.js" type="text/javascript"></script>
<script type="text/javascript">
......
......@@ -42,31 +42,33 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5 bd-content" role="main">
<div class="row m-2 border border- bg-light"><span>{{ count }} compounds</span>
{% if selected_ppis or selected_diseases or selected_taxonomies or selected_boundcomplexes %}
<span>&nbsp;-&nbsp;filters:&nbsp;</span>
{% if selected_ppis %}
{% for selected in selected_ppis %}
<span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
{% endfor %}
<form>
<div class="row m-2 border border-bg-light"><span>{{ count }} compounds</span>
{% if selected_ppis or selected_diseases or selected_taxonomies or selected_boundcomplexes %}
<span>&nbsp;-&nbsp;filters:&nbsp;</span>
{% if selected_ppis %}
{% for selected in selected_ppis %}
{% include "selected_badge.html" with selected=selected %}
{% endfor %}
{% endif %}
{% if selected_diseases %}
{% for selected in selected_diseases %}
{% include "selected_badge.html" with selected=selected %}
{% endfor %}
{% endif %}
{% if selected_taxonomies %}
{% for selected in selected_taxonomies %}
{% include "selected_badge.html" with selected=selected %}
{% endfor %}
{% endif %}
{% if selected_boundcomplexes %}
{% for selected in selected_boundcomplexes %}
{% include "selected_badge.html" with selected=selected %}
{% endfor %}
{% endif %}
{% endif %}
{% if selected_diseases %}
{% for selected in selected_diseases %}
<span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
{% endfor %}
{% endif %}
{% if selected_taxonomies %}
{% for selected in selected_taxonomies %}
<span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
{% endfor %}
{% endif %}
{% if selected_boundcomplexes %}
{% for selected in selected_boundcomplexes %}
<span class="badge badge-info" style="font-size: 100%">{{ selected.name }}</span>&nbsp;
{% endfor %}
{% endif %}
{% endif %}
</div>
</div>
</form>
{% if compounds %}
{% for compound in compounds %}
{% include "compound_abstract.html" with compound=compound %}
......
......@@ -13,7 +13,7 @@
{% for element in selected_list %}
<div class="form-check col-12">
<label class="form-check-label">
<input class="form-check-input text-right" type="checkbox" checked value="{{ element.id }}" onchange="this.form.submit()" name="{{ param_name }}" style="width: auto; margin-right: 1em;">
<input id="selected-{{ element.id }}" class="form-check-input text-right" type="checkbox" checked value="{{ element.id }}" onchange="this.form.submit()" name="{{ param_name }}" style="width: auto; margin-right: 1em;">
{{ element.name }}
</label>
</div>
......
<span class="badge badge-info" style="font-size: 100%">{{ selected.name }}
<a href="#" style="color: white;" onclick="$('#selected-{{ selected.id}}')[0].click();"><i class="remove fa fa-times-circle"></i></a>
</span>&nbsp;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment