Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1077 → Rev 1078

/trunk/widget/modules/recherche/config.defaut.ini
1,9 → 1,14
[url]
efloreScriptUrl = "http://www.tela-botanica.org/eflore-test/consultation/presentations/scripts/recherche.js"
efloreConsultationUrl = "http://www.tela-botanica.org/eflore-test/consultation/"
efloreRechercheSciUrlTpl = "http://www.tela-botanica.org/test-service:eflore:0.1/{referentiel}/noms"
efloreRechercheVernaUrlTpl = "http://www.tela-botanica.org/test-service:eflore:0.1/{referentiel}/noms-vernaculaires"
ficheTaxonUrlTpl = "http://www.tela-botanica.org/eflore-test/consultation/index.php?referentiel={referentiel}&niveau=2&module=fiche&action=fiche&num_nom={num_taxon}&type_nom=nom_scientifique&nom="
efloreScriptUrl = "http://www.tela-botanica.org/eflore/consultation/presentations/scripts/recherche.js"
; url vers l'application utilisée par défaut
efloreConsultationUrl = "http://www.tela-botanica.org/page:eflore_beta"
; url spécifique à un référentiel
efloreConsultationBdtfxUrl = "http://www.tela-botanica.org/page:eflore_bdtfx"
; url spécifique à un référentiel
efloreConsultationBdtxaUrl = "http://www.tela-botanica.org/page:isfgm"
efloreRechercheSciUrlTpl = "http://www.tela-botanica.org/service:eflore:0.1/{referentiel}/noms"
efloreRechercheVernaUrlTpl = "http://www.tela-botanica.org/service:eflore:0.1/{referentiel}/noms-vernaculaires"
ficheTaxonUrlTpl = "?referentiel={referentiel}&niveau=2&module=fiche&action=fiche&num_nom={num_taxon}&type_nom=nom_scientifique&nom="
 
[referentiel]
referentielsSciDispos = bdtfx#France : métropole,bdtxa#France : Antilles,isfan#Afrique du Nord
/trunk/widget/modules/recherche/Recherche.php
56,6 → 56,7
$widget['donnees']['ficheTaxonUrlTpl'] = $this->config['url']['ficheTaxonUrlTpl'];
$widget['donnees']['referentielsSciDispos'] = $this->traiterReferentielSciDispos();
$widget['donnees']['referentielsConsultationUrls'] = $this->traiterUrlsConsultationReferentiels($widget['donnees']['referentielsSciDispos']);
$widget['donnees']['referentielsVernasDispos'] = $this->traiterReferentielsSciVernasDispos();
$ref_sci_defaut = array_shift(array_keys($widget['donnees']['referentielsSciDispos']));
$ref_verna_defaut = $widget['donnees']['referentielsVernasDispos'][$ref_sci_defaut];
87,5 → 88,18
}
return $tab_refs_verna;
}
private function traiterUrlsConsultationReferentiels($referentiels) {
$urls = array();
foreach($referentiels as $code_ref => $nom) {
$config_url_ref = 'efloreConsultation'.ucwords($code_ref).'Url';
if(isset($this->config['url'][$config_url_ref])) {
$urls[$code_ref] = $this->config['url'][$config_url_ref];
} else {
$urls[$code_ref] = $this->config['url']['efloreConsultationUrl'];
}
}
return $urls;
}
}
?>
/trunk/widget/modules/recherche/squelettes/exemple.tpl.html
1,12 → 1,12
<div id="recherche-eflore-1">
<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/jquery-ui/1.8.17/js/jquery-ui-1.8.17.custom.min.js"></script>
<link xmlns:xh="http://www.w3.org/1999/xhtml/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rel="xh:stylesheet stylesheet" href="http://tela-botanica.org/eflore-test/consultation/presentations/styles/eflore.css" media="screen" type="text/css" />
<link xmlns:xh="http://www.w3.org/1999/xhtml/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rel="xh:stylesheet stylesheet" href="http://tela-botanica.org/eflore-test/consultation/widget/modules/recherche/squelettes/css/recherche.css" media="screen" type="text/css" />
<link xmlns:xh="http://www.w3.org/1999/xhtml/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rel="xh:stylesheet stylesheet" href="http://localhost/eflore-consultation/presentations/styles/eflore.css" media="screen" type="text/css" />
<link xmlns:xh="http://www.w3.org/1999/xhtml/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rel="xh:stylesheet stylesheet" href="http://localhost/eflore-consultation/widget/modules/recherche/squelettes/css/recherche.css" media="screen" type="text/css" />
<link href="http://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.17/css/ui-lightness/jquery-ui-1.8.17.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(document).ready(function() {
$.getJSON("http://www.tela-botanica.org/eflore-test/consultation/widget/recherche/?mode=ajax&callback=?", function (moteur) {
$.getJSON("http://localhost/eflore-consultation/widget/recherche/?mode=ajax&callback=?", function (moteur) {
$("#recherche-eflore-1").append(moteur.contenu);
initialiser();
});
/trunk/widget/modules/recherche/squelettes/css/recherche.css
18,6 → 18,10
padding: 8px;
}
 
#conteneur-recherche h1 {
font-size: 14px;
}
 
#conteneur-recherche .zone-choix-referentiel {
padding: 3px;
padding-bottom : 5px;
/trunk/widget/modules/recherche/squelettes/recherche.tpl.html
11,8 → 11,10
var VALEUR_DEFAUT_BIB = "";
var VALEUR_DEFAUT_DATE = "";
var URL_BASE_FICHE_TAXON = "<?= $ficheTaxonUrlTplDefaut; ?>";
<?php $js = json_encode($referentielsVernasDispos); ?>
var REFERENTIELS_VERNA_DISPOS = <?= $js ; ?>;
<?php $refs_urls = json_encode($referentielsConsultationUrls); ?>
var REFERENTIELS_CONSULTATION_URLS = <?= $refs_urls; ?>;
<?php $refs_verna = json_encode($referentielsVernasDispos); ?>
var REFERENTIELS_VERNA_DISPOS = <?= $refs_verna; ?>;
var URL_SERVICE_AUTOCOMPLETION_NOM_SCI = "<?= $efloreRechercheSciUrlDefaut; ?>";
var URL_SERVICE_AUTOCOMPLETION_NOM_VERNA = "<?= $efloreRechercheVernaUrlDefaut; ?>";
20,7 → 22,8
ref_sci = $(".selection-referentiel[disabled=disabled]").attr("name");
$("#eflore_nomenclature_referentiel").val(ref_sci);
URL_SERVICE_AUTOCOMPLETION_NOM_SCI = URL_SERVICE_AUTOCOMPLETION_NOM_SCI_TPL.replace("{referentiel}", ref_sci);
URL_BASE_FICHE_TAXON = URL_BASE_FICHE_TAXON_TPL.replace("{referentiel}", ref_sci);
URL_BASE_FICHE_TAXON = REFERENTIELS_CONSULTATION_URLS[ref_sci]+URL_BASE_FICHE_TAXON_TPL.replace("{referentiel}", ref_sci);
console.log(URL_BASE_FICHE_TAXON);
if(REFERENTIELS_VERNA_DISPOS[ref_sci] != undefined) {
URL_SERVICE_AUTOCOMPLETION_NOM_VERNA = URL_SERVICE_AUTOCOMPLETION_NOM_VERNA_TPL.replace("{referentiel}", REFERENTIELS_VERNA_DISPOS[ref_sci]);
$("#type_nom_vernaculaire").parent().css("visibility","visible");
30,6 → 33,7
$('#nom').val();
$('#nom').attr("placeholder", "");
}
$('#ef-form-nomenclature').attr("action", REFERENTIELS_CONSULTATION_URLS[ref_sci]);
}
function mettreEnValeurReferentielSelectionne(bouton) {