From 77dd4d0afb196c1daa074ae2395804cefcbd340b Mon Sep 17 00:00:00 2001 From: rloth <romain.loth@iscpif.fr> Date: Tue, 6 Jun 2017 15:14:05 +0200 Subject: [PATCH] fix old condition assumed that source gexf file was equivalent to having a 'name' node attribute, which is not the case in specifications? --- tinawebJS/methods.js | 44 +++++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/tinawebJS/methods.js b/tinawebJS/methods.js index f41ef22..a2f1d4a 100755 --- a/tinawebJS/methods.js +++ b/tinawebJS/methods.js @@ -417,37 +417,27 @@ function htmlfied_nodesatts(elems){ var id=elems[i] var node = TW.Nodes[id] - if (TW.mainfile) { - var addname = (node.attributes["name"])?node.attributes["name"]:""; - var google='<a target="_blank" href="http://www.google.com/search?q='+addname+"+"+node.label.replace(" ","+")+'">'; - information += '<li><b>'+ google + node.label + '</a></b></li>'; - for (var i in node.attributes) { - if(i=="cluster_label") - information += '<li> '+i +" : " + node.attributes[i] + '</li>'; - } - socnodes.push(information); - } else { - if(node.type==TW.conf.catSoc){ - information += '<li><b>' + node.label + '</b></li>'; - if(node.htmlCont==""){ - if (!isUndef(node.level)) { - information += '<li>' + node.level + '</li>'; - } - } else { - information += '<li>' + $("<div/>").html(node.htmlCont).text() + '</li>'; + if(node.type==TW.conf.catSoc){ + information += '<li><b>' + node.label + '</b></li>'; + if(node.htmlCont==""){ + if (!isUndef(node.level)) { + information += '<li>' + node.level + '</li>'; } - socnodes.push(information) + } else { + information += '<li>' + $("<div/>").html(node.htmlCont).text() + '</li>'; } + socnodes.push(information) + } - if(node.type==TW.conf.catSem){ - information += '<li><b>' + node.label + '</b></li>'; - let google='<a href=http://www.google.com/#hl=en&source=hp&q=%20'+node.label.replace(" ","+")+'%20><img src="'+'img/google.png"></img></a>'; - let wiki = '<a href=http://en.wikipedia.org/wiki/'+node.label.replace(" ","_")+'><img src="'+'img/wikipedia.png"></img></a>'; - let flickr= '<a href=http://www.flickr.com/search/?w=all&q='+node.label.replace(" ","+")+'><img src="'+'img/flickr.png"></img></a>'; - information += '<li>'+google+" "+wiki+" "+flickr+'</li><br>'; - semnodes.push(information) - } + if(node.type==TW.conf.catSem){ + information += '<li><b>' + node.label + '</b></li>'; + let google='<a href=http://www.google.com/#hl=en&source=hp&q=%20'+node.label.replace(" ","+")+'%20><img src="'+'img/google.png"></img></a>'; + let wiki = '<a href=http://en.wikipedia.org/wiki/'+node.label.replace(" ","_")+'><img src="'+'img/wikipedia.png"></img></a>'; + let flickr= '<a href=http://www.flickr.com/search/?w=all&q='+node.label.replace(" ","+")+'><img src="'+'img/flickr.png"></img></a>'; + information += '<li>'+google+" "+wiki+" "+flickr+'</li><br>'; + semnodes.push(information) } + } return socnodes.concat(semnodes) } -- 2.21.0