Commit 55187150 authored by Romain Loth's avatar Romain Loth

[FEAT] total count of relevant publications shown in graphExplorer pub tab

parent 637d6208
...@@ -597,8 +597,10 @@ function getTopPapers(type){ ...@@ -597,8 +597,10 @@ function getTopPapers(type){
// pr(window.location.origin+'/api/tfidf/'+corpus_id+'/'+theids.join("a") ) // pr(window.location.origin+'/api/tfidf/'+corpus_id+'/'+theids.join("a") )
// var arraydata = $.parseJSON(data) // var arraydata = $.parseJSON(data)
var output = "<ul style='padding: 0px; margin: 13px;'>" var output = "<ul style='padding: 0px; margin: 13px;'>"
for(var i in data) { var nDocsHavingNgram = data.count ;
var pub = data[i] var nDocsShown = data.records.length ;
for(var i in data.records) {
var pub = data.records[i]
if(pub["title"]) { if(pub["title"]) {
var gquery = "https://search.iscpif.fr/?categories=general&q="+pub["title"].replace(" "+"+") var gquery = "https://search.iscpif.fr/?categories=general&q="+pub["title"].replace(" "+"+")
...@@ -645,6 +647,13 @@ function getTopPapers(type){ ...@@ -645,6 +647,13 @@ function getTopPapers(type){
} }
output += "</ul>" output += "</ul>"
$("#tab-container-top").show(); $("#tab-container-top").show();
$("#pubs-count-info").remove()
var countInfo = $('<span />').attr('id', 'pubs-count-info')
countInfo.html(" ("+nDocsShown + "/" + nDocsHavingNgram+")")
$("#pubs-legend").append(countInfo)
// $('#tab-container-top').easytabs({updateHash:false}); // $('#tab-container-top').easytabs({updateHash:false});
$("#topPapers").html(output); $("#topPapers").html(output);
}, },
......
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
<div id="tab-container-top" class='tab-container' style="display: none;"> <div id="tab-container-top" class='tab-container' style="display: none;">
<ul class='etabs'> <ul class='etabs'>
<li id="tabmed" class='tab active'><a href="#tabs3">Pubs</a></li> <li id="tabmed" class='tab active'><a id="pubs-legend" href="#tabs3">Pubs</a></li>
<li id="tabgps" class='tab'><a href="#tabs3"></a></li> <li id="tabgps" class='tab'><a href="#tabs3"></a></li>
</ul> </ul>
......
Markdown is supported
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