Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1040 → Rev 1041

/trunk/widget/modules/recherche/config.defaut.ini
1,9 → 1,9
[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;
ficheTaxonTplUrlTpl = http://www.tela-botanica.org/{referentiel}-nn-{num_nom};
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="
 
[referentiel]
referentielsSciDispos = bdtfx,bdtxa,isfan
/trunk/widget/modules/recherche/Recherche.php
53,14 → 53,15
$widget['donnees']['efloreConsultationUrl'] = $this->config['url']['efloreConsultationUrl'];
$widget['donnees']['efloreRechercheSciUrlTpl'] = $this->config['url']['efloreRechercheSciUrlTpl'];
$widget['donnees']['efloreRechercheVernaUrlTpl'] = $this->config['url']['efloreRechercheVernaUrlTpl'];
$widget['donnees']['ficheTaxonUrlTpl'] = $this->config['url']['ficheTaxonTplUrlTpl'];
$widget['donnees']['ficheTaxonUrlTpl'] = $this->config['url']['ficheTaxonUrlTpl'];
$widget['donnees']['referentielsSciDispos'] = $this->traiterReferentielSciDispos();
$widget['donnees']['referentielsVernasDispos'] = $this->traiterReferentielsSciVernasDispos();
$ref_sci_defaut = $widget['donnees']['referentielsSciDispos'][0];
$ref_verna_defaut = $widget['donnees']['referentielsVernasDispos'][$ref_sci_defaut];
$widget['donnees']['efloreRechercheSciUrlDefaut'] = str_replace('{referentiel}', $ref_sci_defaut,$this->config['url']['efloreRechercheSciUrlTpl']);
$widget['donnees']['efloreRechercheSciUrlDefaut'] = str_replace('{referentiel}', $ref_sci_defaut, $this->config['url']['efloreRechercheSciUrlTpl']);
$widget['donnees']['efloreRechercheVernaUrlDefaut'] = str_replace('{referentiel}',$ref_verna_defaut, $this->config['url']['efloreRechercheVernaUrlTpl']);
$widget['donnees']['ficheTaxonUrlTplDefaut'] = str_replace('{referentiel}', $ref_sci_defaut, $this->config['url']['ficheTaxonUrlTpl']);
$widget['squelette'] = 'recherche';
return $widget;
}
/trunk/widget/modules/recherche/squelettes/recherche.tpl.html
4,12 → 4,13
var AUTOCOMPLETION_ELEMENTS_NBRE = 50;
var URL_SERVICE_AUTOCOMPLETION_NOM_SCI_TPL = "<?= $efloreRechercheSciUrlTpl; ?>";
var URL_SERVICE_AUTOCOMPLETION_NOM_VERNA_TPL = "<?= $efloreRechercheVernaUrlTpl; ?>";
var URL_BASE_FICHE_TAXON_TPL = "<?= $ficheTaxonUrlTpl; ?>";
var VALEUR_DEFAUT_NOM_SCI = "Saisir un nom scientifique (sans auteur)";
var VALEUR_DEFAUT_NOM_VERNA = "Saisir un nom commun";
var VALEUR_DEFAUT_AU = "";
var VALEUR_DEFAUT_BIB = "";
var VALEUR_DEFAUT_DATE = "";
var URL_BASE_FICHE_TAXON = "<?= $ficheTaxonUrlTpl; ?>";
var URL_BASE_FICHE_TAXON = "<?= $ficheTaxonUrlTplDefaut; ?>";
<?php $js = json_encode($referentielsVernasDispos); ?>
var REFERENTIELS_VERNA_DISPOS = <?= $js ; ?>;
var URL_SERVICE_AUTOCOMPLETION_NOM_SCI = "<?= $efloreRechercheSciUrlDefaut; ?>";
18,6 → 19,7
function gererVisibiliteSelecteurNom() {
ref_sci = $("input[name=referentiel]:checked").val();
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);
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");
/trunk/widget/modules/recherche/squelettes/exemple.tpl.html
1,11 → 1,11
<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://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 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 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">
$.getJSON("http://localhost/eflore-consultation/widget/recherche/?mode=ajax&callback=?", function (moteur) {
$.getJSON("http://www.tela-botanica.org/eflore-test/consultation/widget/recherche/?mode=ajax&callback=?", function (moteur) {
$("#recherche-eflore-1").append(moteur.contenu);
initialiser();
});