354,23 → 354,34 |
function gererClicIllustrationsResultats() { |
$('.illustration_resultat_cel').click(function() { |
var url = $(this).attr('src')/*.replace('CS','XL')*/; |
var titre = $(this).parent().find('a.lien_fiche_eflore').text(); |
var titre = trouverNomTaxon($(this)); |
console.log($(this).parent().parent().find('a.lien_fiche_eflore')); |
ouvrirFenetreIllustrationResultat(url, titre, 400, 400); |
}); |
|
$('.illustration_resultat_choro').click(function() { |
var url = $(this).attr('src').replace('108x101','432x404'); |
var titre = 'Chorologie du taxon '+$(this).parent().find('a.lien_fiche_eflore').text(); |
var titre = 'Chorologie du taxon '+trouverNomTaxon($(this)); |
ouvrirFenetreIllustrationResultat(url, titre, 432, 404); |
}); |
|
$('.illustration_resultat_coste').click(function() { |
var url = $(this).attr('src'); |
var titre = 'Illustration de Coste du taxon '+$(this).parent().find('a.lien_fiche_eflore').text(); |
var titre = 'Illustration de Coste du taxon '+trouverNomTaxon($(this)); |
ouvrirFenetreIllustrationResultat(url, titre, 400, 400); |
}); |
} |
|
function trouverNomTaxon(objet) { |
nom = ""; |
if(nomVernaculaireEstDemande()) { |
nom = objet.parent().parent().find('a.lien_fiche_eflore').text(); |
} else { |
nom = objet.parent().find('a.lien_fiche_eflore').text(); |
} |
return nom; |
} |
|
function ouvrirFenetreIllustrationResultat(url, titre, hauteur, largeur) { |
var fenetre = window.open('_blank', titre,'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(largeur+17)+', height='+(hauteur+17)); |
var tmp = fenetre.document; |