diff options
Diffstat (limited to 'gn2/wqflask/templates/gnqa_answer.html')
-rw-r--r-- | gn2/wqflask/templates/gnqa_answer.html | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/gn2/wqflask/templates/gnqa_answer.html b/gn2/wqflask/templates/gnqa_answer.html index f8010931..fea487b9 100644 --- a/gn2/wqflask/templates/gnqa_answer.html +++ b/gn2/wqflask/templates/gnqa_answer.html @@ -134,7 +134,7 @@ outline: none; <div style="margin: 5px;color:#3071a9;cursor: pointer;" > <button type="button" data-toggle="modal" data-target=".bd-pubmed-modal-lg-{{reference.doc_id}}" style="border:none;text-decoration:underline;outline: none;padding:5px;margin-left:25px;background: transparent;"> - <span><b>*See PubMed Search</b></span> + <span><b>See PubMed Info</b></span> </button> </div> @@ -146,7 +146,7 @@ outline: none; {% endif %} - <p>{{reference.comboTxt}}</p> + <p class="node-references">{{reference.comboTxt}}</p> <div class="rating" style="margin-right:20px;padding:5px;text-align: right;" data-doc-id="{{reference.doc_id}}" data-task-id="{{task_id['task_id']}}"> <button class="btn" id="green" data-toggle="tooltip" data-placement="top" title="rate this reference +1 "><i class="fa fa-thumbs-up fa-lg" aria-hidden="true"></i></button> @@ -184,7 +184,7 @@ outline: none; <div style="margin: 5px;color:#3071a9;cursor: pointer;" > <button type="button" data-toggle="modal" data-target=".bd-pubmed-modal-lg-{{reference.doc_id}}" style="border:none;text-decoration:underline;outline: none;padding:5px;margin-left:25px;background: transparent;"> - <span><b>*See PubMed Search</b></span> + <span><b>See PubMed Info</b></span> </button> </div> @@ -201,7 +201,7 @@ outline: none; - <p>{{reference.comboTxt}}</p> + <p class="node-references">{{reference.comboTxt}}</p> <div class="rating" style="margin-right:20px;padding:5px;text-align: right;" data-doc-id="{{reference.doc_id}}" data-task-id="{{task_id['task_id']}}"> <button class="btn" id="green" data-toggle="tooltip" data-placement="top" title="rate this reference +1 "><i class="fa fa-thumbs-up fa-lg" aria-hidden="true"></i></button> @@ -243,7 +243,6 @@ $('.panel-collapse').on('show.bs.collapse', function () { document.addEventListener('DOMContentLoaded', function() { const GN_SERVER_URL = {{gn_server_url|tojson}} - console.log(GN_SERVER_URL) $('#globalsearchform').hide() $('#gnqna_search_home').show() $('footer').hide() @@ -296,5 +295,40 @@ if(likeBtn.hasClass("blue")){ }) </script> + +<script src="{{ url_for('js', filename='linkify/linkify.min.js') }}" type="text/javascript"></script> +<script src="{{ url_for('js', filename='linkify/linkify-html.min.js') }}" type="text/javascript"></script> + + +<script type="text/javascript"> + + +const nodeLinkify = (node_list)=>{ +node_list.forEach((node)=>{ + node.innerHTML = linkifyHtml(node.innerHTML, { + target:{ + url:"_blank", + email:null + } + }) +}) +} + + nodeLinkify(document.querySelectorAll(".pubmed-abstract")) + + nodeLinkify(document.querySelectorAll(".node-references")) + +var coll = document.getElementsByClassName("collapsible-btn"); +for (var i = 0; i < coll.length; i++) { + coll[i].addEventListener("click", function() { + + this.classList.toggle("active-btn"); + }); +} + + + +</script> + {% endblock %} |