Difference between revisions of "MediaWiki:Infografics EUProjects"

From Culture.si
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', showDetails)
+
.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;

Revision as of 18:52, 23 July 2014