Difference between revisions of "MediaWiki:Infografics EUProjects"
Line 206: | Line 206: | ||
'oblikovanje, arhitektura in uporabne umetnosti':'architecture, design and applied arts', | 'oblikovanje, arhitektura in uporabne umetnosti':'architecture, design and applied arts', | ||
}; | }; | ||
+ | |||
+ | var openDetail = function(d) { | ||
+ | if(d.link) { | ||
+ | window.location=d.link; | ||
+ | } | ||
+ | } | ||
var showDetails = function(d) { | var showDetails = function(d) { | ||
Line 261: | Line 267: | ||
.append('span') | .append('span') | ||
.attr('class', function(d){ return 'circle ' + d.f_area.replace(/ /g, '_').replace(/\,/g,'').replace('šč', 'sc'); }) | .attr('class', function(d){ return 'circle ' + d.f_area.replace(/ /g, '_').replace(/\,/g,'').replace('šč', 'sc'); }) | ||
− | .on('click', | + | .on('click', openDetail) |
.on('mouseover', showDetails) | .on('mouseover', showDetails) | ||
Line 285: | Line 291: | ||
.append('span') | .append('span') | ||
.attr('class', function(d){ return 'circle ' + d.org_status }) | .attr('class', function(d){ return 'circle ' + d.org_status }) | ||
− | .on('click', showDetails) | + | .on('click', openDetail) |
+ | .on('mouseover', showDetails) | ||
return false; | return false; | ||
Line 311: | Line 318: | ||
return 'circle ' + role; | return 'circle ' + role; | ||
}) | }) | ||
− | .on('click', showDetails) | + | .on('click', openDetail) |
+ | .on('mouseover', showDetails) | ||
return false; | return false; |