/trunk/modules/resultat/squelettes/determination.tpl.html |
---|
21,7 → 21,7 |
<?php else : ?> |
<p class="absent"> |
Pas de photo<br /> |
<a href="http://www.tela-botanica.org/page:saisie_observations?langue=fr" |
<a href="http://www.tela-botanica.org/page:cel" |
title="Ajouter une photographie au moyen du Carnet en Ligne" |
onclick="window.open(this.href); return false;" class="contribuer"> |
Contribuer |
/trunk/modules/resultat/squelettes/determination_verna.tpl.html |
---|
45,7 → 45,7 |
<?php else : ?> |
<p class="absent"> |
Pas de photo<br /> |
<a href="http://www.tela-botanica.org/appli:cel#<?=$nnTaxon?>" |
<a href="http://www.tela-botanica.org/page:cel" |
title="Ajouter une photographie au moyen du Carnet en Ligne" |
onclick="window.open(this.href); return false;" class="contribuer"> |
Contribuer |
/trunk/modules/popup_galerie/squelettes/popup_galerie_illustrations.tpl.html |
---|
1,45 → 1,193 |
<script type="text/javascript"> |
<!-- |
var urls = [<?= '"'.implode($urls, '","').'"'; ?>]; |
var ids = [<?= '"'.implode($ids, '","').'"'; ?>]; |
var meta = new Array(); |
var indexImage = 0; |
var urlImage = "<?= $url_image; ?>"; |
$(document).ready(function() { |
$('#precedent').click(function() { |
var tailleMax = 580; |
var titre = "<?= $titre; ?>"; |
var urlMeta = "<?= $url_meta; ?>"; |
var urlContact = "<?= $url_contact; ?>"; |
var metadonneesOuvertes = false; |
var hauteurSansMeta = null; |
function redimensionnerImage(objet) { |
objet.removeAttr("width"); |
objet.removeAttr("height"); |
var hauteurImage = objet.height(); |
var largeurImage = objet.width(); |
var rapport = 1; |
if(hauteurImage > largeurImage && hauteurImage > tailleMax) { |
rapport = largeurImage/hauteurImage; |
hauteurImage = 580; |
largeurImage = hauteurImage*rapport; |
$('#illustration').attr("height", hauteurImage); |
$('#illustration').attr("width", largeurImage); |
} |
hauteurSansMeta = hauteurImage+90; |
window.resizeTo(largeurImage+150,hauteurImage+90); |
} |
function imageSuivante() { |
indexImage++; |
if(indexImage >= urls.length) { |
indexImage = 0; |
} |
cacherMetadonnees(); |
$('#illustration').attr('src', urls[indexImage]); |
} |
function imagePrecedente() { |
indexImage--; |
if(indexImage <= 0) { |
indexImage = urls.length - 1; |
} |
console.log(indexImage); |
cacherMetadonnees(); |
$('#illustration').attr('src', urls[indexImage]); |
} |
function ouvrirFenetreIllustrationResultat(url, titre) { |
var fenetre = window.open('', titre+" - zoom "); |
var tmp = fenetre.document; |
tmp.write('<html><head><title>'+titre+" - zoom "+'</title>'); |
tmp.write('</head><body>'); |
tmp.write('<p style="height="100%";text-align:center;line-height="100%"><img id="image_agrandie" style="vertical-align:middle;" src="'+url+'" /></p>'); |
tmp.write('</body></html>'); |
tmp.clos(); |
} |
function obtenirUrlContact(idImage, IdAuteur) { |
return urlContact.replace('{id_auteur}',IdAuteur).replace('{id_img}',idImage); |
} |
function formaterDate(string) { |
var date = new Date(); |
var parts = String(string).split(/[- :]/); |
date.setFullYear(parts[0]); |
date.setMonth(parts[1] - 1); |
date.setDate(parts[2]); |
date.setHours(parts[3]); |
date.setMinutes(parts[4]); |
date.setSeconds(parts[5]); |
date.setMilliseconds(0); |
return (("0" + date.getDate()).slice(-2))+"/"+(("0"+(date.getMonth()+1)).slice(-2))+"/"+date.getFullYear(); |
} |
function formaterMetadonnees(data) { |
data.contact_url = obtenirUrlContact(ids[indexImage], data['auteur.id']); |
data.id = ids[indexImage]; |
data.date = formaterDate(data.date); |
return data; |
} |
function chargerEtAfficherMetadonnees() { |
$('#info-obs-meta').remove(); |
if(meta[ids[indexImage]] == null) { |
var urlMetaImage = urlMeta.replace('{projet}','cel').replace('{id}',ids[indexImage]); |
$.get(urlMetaImage, function(data) { |
data = formaterMetadonnees(data); |
afficherMetadonnees(data); |
meta[ids[indexImage]] = data; |
}); |
} else { |
afficherMetadonnees(meta[ids[indexImage]]); |
} |
} |
$('#suivant').click(function() { |
indexImage++; |
if(indexImage >= urls.length) { |
indexImage = 0; |
function afficherMetadonnees(data) { |
$("#tpl-obs-meta").tmpl(data).appendTo('.img-cadre'); |
window.resizeTo($(window).width(),hauteurSansMeta+215); |
$("#lien-voir-meta").html('Cacher les informations'); |
} |
console.log(indexImage); |
$('#illustration').attr('src', urls[indexImage]); |
function cacherMetadonnees() { |
window.resizeTo($(window).width(), hauteurSansMeta); |
$('#info-obs-meta').remove(); |
$("#lien-voir-meta").html('Informations sur cette image / Contacter l\'auteur'); |
metadonneesOuvertes = false; |
} |
$(document).ready(function() { |
$('#precedent').click(function() { |
imagePrecedente(); |
}); |
$('#suivant').click(function() { |
imageSuivante(); |
}); |
if(urlImage != "null" && urlImage != "") { |
indexImage = Array.indexOf(urls, urlImage); |
$('#illustration').attr('src', urls[indexImage]); |
} |
$('#illustration').load(function() { |
redimensionnerImage($(this)); |
}); |
$('#illustration').click(function() { |
ouvrirFenetreIllustrationResultat($(this).attr("src").replace("L","X3L"), titre); |
}); |
$("#lien-voir-meta").click(function() { |
metadonneesOuvertes = !metadonneesOuvertes; |
if(metadonneesOuvertes) { |
chargerEtAfficherMetadonnees(); |
} else { |
cacherMetadonnees(); |
} |
}); |
$("body").keydown(function(e) { |
if(e.keyCode == 37) { // gauche |
imagePrecedente(); |
} |
else if(e.keyCode == 39) { // droite |
imageSuivante(); |
} |
}); |
$('#zone-pied').hide(); |
}); |
// --> |
</script> |
<div id="info-img"> |
<!-- Squelette du contenu du tableau des observation --> |
<script id="tpl-obs-meta" type="text/x-jquery-tmpl"> |
<div id="info-obs-meta" class="importance1"> |
<dl> |
<dt>Photo n°</dt><dd>${id}</dd> |
<dt>Titre</dt><dd>${$data["determination.nom_sci"]}</dd> |
<dt>Description</dt><dd>${$data['determination.libelle']}</dd> |
<dt>Localisation</dt><dd>${$data['station.commune']}</dd> |
<dt>Auteur</dt> |
<dd> |
${$data['auteur.libelle']} |
<a class="mailto" href="${contact_url}">(Contacter ...)</a> |
</dd> |
<dt>Date d'observation</dt><dd>${date}</dd> |
<dt>Licence</dt><dd><a class="lien-externe" href="http://www.tela-botanica.org/page:licence">CC-BY-SA</a></dd> |
</dl> |
</div> |
</script> |
<div id="info-img-galerie"> |
<div class="conteneur-precedent"> |
<a id="precedent" href="#"> |
<a id="precedent" href="#" title="cliquez ici ou utilisez la flèche gauche pour afficher l'image précédente"> |
<img style="border:none" src="http://www.tela-botanica.org/sites/commun/generique/images/flecheGauche.jpg" alt="<" /> |
</a> |
</div> |
<div class="img-cadre"> |
<img id="illustration" src="<?=$urls[0]?>" alt="" /> |
<img id="illustration" src="<?=$urls[0]?>" alt="" title="cliquez pour voir cette image dans son format original" /><br /> |
<a id="lien-voir-meta" href="#" title="cliquez ici pour voir les métadonnées de l'image et contacter l'auteur">Informations sur cette image / Contacter l'auteur</a> |
</div> |
<div class="conteneur-suivant"> |
<a id="suivant" href="#"> |
<a id="suivant" href="#" title="cliquez ici ou utilisez la flèche droite pour afficher l'image suivante"> |
<img style="border:none" src="http://www.tela-botanica.org/sites/commun/generique/images/flecheDroite.jpg" alt=">" /> |
</a> |
</div> |
/trunk/modules/popup_galerie/PopupGalerie.php |
---|
17,7 → 17,9 |
private $urlImage = null; |
private $images = null; |
private $appUrls = null; |
private $format = 'CS'; |
private $titre = ''; |
private $format_miniature = 'CS'; |
private $format_agrandi = 'L'; |
public function initialiser() { |
$this->capturerParametres(); |
36,7 → 38,10 |
if (isset($_GET['format'])) { |
$this->format = $_GET['format']; |
} |
if (isset($_GET['titre'])) { |
$this->titre = $_GET['titre']; |
} |
} |
public function executerActionParDefaut() { |
$this->executerFiche(); |
46,13 → 51,31 |
$infos = array(); |
$this->images->setProjet('cel'); |
$urls = $this->images->getUrlsImagesParIdsNoms(array($this->num_nom)); |
$infos['urls'] = $urls['bdtfx.'.$this->num_nom]; |
$urls = $urls['bdtfx.'.$this->num_nom]; |
$ids = array(); |
foreach($urls as $index => $url) { |
$urls[$index] = str_replace($this->format_miniature, $this->format_agrandi, $url); |
$ids[$index] = $this->extraireIdDeUrl($url); |
} |
$infos['urls'] = $urls; |
$infos['ids'] = $ids; |
$infos['num_nom'] = $this->num_nom; |
$infos['url_image'] = $this->urlImage; |
$infos['url_image'] = str_replace($this->format_miniature, $this->format_agrandi, $this->urlImage); |
$infos['titre'] = $this->titre; |
$infos['url_meta'] = Config::get('imagesPopupTpl'); |
$infos['url_contact'] = $this->appUrls->obtenirUrlPopUpContact("{id_auteur}", "{id_img}"); |
$this->setSortie(self::META_TITRE,$this->titre, true); |
$this->setSortie(self::RENDU_CORPS, $this->getVue('popup_galerie_illustrations', $infos)); |
} |
private function extraireIdDeUrl($url) { |
$matches = array(); |
preg_match('#cel-img:([0-9]*)'.$this->format_miniature.'#', $url, $matches); |
return ltrim($matches[1],'0'); |
} |
private function formaterDateImg($date) { |
$dateFmt = $date; |
if ($date == '0000-00-00' || $date == '1970-01-01 01:01:01') { |
/trunk/modules/popup_contact/squelettes/form_identification.tpl.html |
---|
1,7 → 1,7 |
<div class="importance1"> |
<div id="zone-dialogue"> |
<p class="msg attention"> |
Vous n'êtes pas identifiez sur le site de Tela Botanica.<br /> |
Vous n'êtes pas identifié sur le site de Tela Botanica.<br /> |
Veuillez vous identifiez afin d'accéder au formulaire de contact. |
</p> |
</div> |
/trunk/popup.php |
---|
33,6 → 33,7 |
<!-- JavaScript --> |
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/1.7.1/jquery-1.7.1.js"></script> |
<script type="text/Javascript" src="http://www.tela-botanica.org/commun/jquery/cookie/1.0/jquery.cookie.min.js"></script> |
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> |
<script type="text/Javascript" src="presentations/scripts/eflore.js"></script> |
<!-- JavaScript et CSS spécifiques au module --> |
46,14 → 47,10 |
<div id="zone-corps"> |
<?php echo AppControleur::getContenuCorps(); ?> |
</div> |
<div id="zone-pied"> |
<?php echo AppControleur::getContenuPied(); ?> |
<div id="zone-debug"> |
<?php echo AppControleur::getChrono(); ?> |
<?php echo AppControleur::getExceptions(); ?> |
</div> |
</div> |
</div> |
/trunk/presentations/styles/popup.css |
---|
35,13 → 35,13 |
/*----------------------------------------------------------------------------------------------------------*/ |
/* Spécifiques popup : GALERIE */ |
#info-img .conteneur-precedent { |
#info-img-galerie .conteneur-precedent { |
float:left; |
width:10%; |
height:300px; |
} |
#info-img .conteneur-suivant { |
#info-img-galerie .conteneur-suivant { |
height:300px; |
position:relative; |
width:10%; |
48,7 → 48,7 |
float:right; |
} |
#info-img .conteneur-precedent #precedent, #info-img .conteneur-suivant #suivant { |
#info-img-galerie .conteneur-precedent #precedent, #info-img-galerie .conteneur-suivant #suivant { |
position:relative; |
top:50%; |
font-size:1.3em; |
55,13 → 55,18 |
border:none; |
} |
#info-img .conteneur-suivant #suivant { |
#info-img-galerie .conteneur-suivant #suivant { |
float:right; |
text-align:right; |
} |
#info-img .img-cadre { |
#info-img-galerie .img-cadre { |
float:left; |
width:80%; |
height:300px; |
cursor: pointer; |
} |
#info-img-galerie #lien-voir-meta { |
text-align: center; |
} |
/trunk/presentations/scripts/recherche.js |
---|
379,9 → 379,9 |
function gererClicIllustrationsResultats() { |
$('.illustration_resultat_cel').click(function() { |
var url = $(this).attr('src'); |
var url = URL_BASE_POPUP+"?module=popup-galerie&action=fiche&num_nom="+$(this).attr('title'); |
var titre = trouverNomTaxon($(this)); |
window.open(url, titre, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(400)+', height='+(375)); |
var url = URL_BASE_POPUP+"?module=popup-galerie&action=fiche&num_nom="+$(this).attr('title')+"&titre="+titre; |
window.open(url, titre, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(700)+', height='+(650)); |
}); |
$('.illustration_resultat_choro').click(function() { |
402,7 → 402,7 |
if(nomVernaculaireEstDemande()) { |
nom = objet.parent().parent().find('a.lien_fiche_eflore').text(); |
} else { |
nom = objet.parent().find('a.lien_fiche_eflore').text(); |
nom = objet.parent().find('.nom-sci a.lien_fiche_eflore').text(); |
} |
return nom; |
} |
/trunk/presentations/scripts/fiche-synthese.js |
---|
637,8 → 637,9 |
function gererClicIllustrationsFiche() { |
$('.illustration_cel').live('click', function() { |
var url_image = $(this).attr('src'); |
var url = urlPopup+"?module=popup-galerie&action=fiche&num_nom="+$(this).attr('title')+"&url_image="+encodeURIComponent(url_image); |
window.open(url, '', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(400)+', height='+(375)); |
var titre = $('.nomenclature').first().text(); |
var url = urlPopup+"?module=popup-galerie&action=fiche&num_nom="+$(this).attr('title')+"&titre="+encodeURIComponent(titre)+"&url_image="+encodeURIComponent(url_image); |
window.open(url, titre, 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(400)+', height='+(375)); |
}); |
$('#synthese_repartition img').click(function() { |