Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1038 → Rev 1039

/trunk/widget/modules/recherche/squelettes/exemple.tpl.html
New file
0,0 → 1,13
<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 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) {
$("#recherche-eflore-1").append(moteur.contenu);
initialiser();
});
</script>
</div>
/trunk/widget/modules/recherche/squelettes/css/recherche.css
New file
0,0 → 1,36
#conteneur-recherche {
width: 750px;
}
 
h1.titre-widget {
margin-top: 5px;
}
 
.importance1 {
background-color: #EAEDCD;
border-radius: 10px 10px 10px 10px;
box-shadow: 2px 2px 5px #AAAAAA;
color: #3A3633;
font-family: arial;
font-size: 11px;
margin: 10px 10px 20px;
padding: 8px;
}
 
.zone-choix-referentiel {
padding: 3px;
padding-bottom : 5px;
padding-left: 10px;
}
 
.label-referentiel {
color: #FD8C13;
font-weight: bold;
letter-spacing: 0;
padding: 0 0 0 5px;
text-transform: uppercase;
}
 
#ef-form-nomenclature label {
display: inline;
}
/trunk/widget/modules/recherche/squelettes/recherche.tpl.html
New file
0,0 → 1,82
<!-- DEBUT FORM_NOM -->
<script type="text/javascript">
<!--
var AUTOCOMPLETION_ELEMENTS_NBRE = 50;
var URL_SERVICE_AUTOCOMPLETION_NOM_SCI_TPL = "<?= $efloreRechercheSciUrlTpl; ?>";
var URL_SERVICE_AUTOCOMPLETION_NOM_VERNA_TPL = "<?= $efloreRechercheVernaUrlTpl; ?>";
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; ?>";
<?php $js = json_encode($referentielsVernasDispos); ?>
var REFERENTIELS_VERNA_DISPOS = <?= $js ; ?>;
var URL_SERVICE_AUTOCOMPLETION_NOM_SCI = "<?= $efloreRechercheSciUrlDefaut; ?>";
var URL_SERVICE_AUTOCOMPLETION_NOM_VERNA = "<?= $efloreRechercheVernaUrlDefaut; ?>";
function gererVisibiliteSelecteurNom() {
ref_sci = $("input[name=referentiel]:checked").val();
URL_SERVICE_AUTOCOMPLETION_NOM_SCI = URL_SERVICE_AUTOCOMPLETION_NOM_SCI_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");
} else {
$("#type_nom_vernaculaire").parent().css("visibility","hidden");
$("#type_nom_scientifique").attr('checked', 'checked');
$('#nom').val();
$('#nom').attr("placeholder", "");
}
}
function initialiser() {
$.getScript("<?= $efloreScriptUrl; ?>").done(function(script, textStatus) {
// la fonction initialiserMoteur est la fonction d'initialisation du script de recherche tiré d'eflore
// elle utilise les variable définies ci dessus, et elle est donc chargée après.
initialiserMoteur();
$("input[name=referentiel]").change(function () {
gererVisibiliteSelecteurNom();
});
gererVisibiliteSelecteurNom();
});
}
 
// -->
</script>
<div class="importance1" id="conteneur-recherche">
<h1 class="titre-widget">Rechercher un nom</h1>
<form id="ef-form-nomenclature" name="ef-form-nomenclature" action="<?= $efloreConsultationUrl; ?>" method="get">
<fieldset>
<div class="zone-choix-referentiel">
<label class="label-referentiel">Référentiel :</label>
<?php $premier_ref = true; ?>
<?php foreach($referentielsSciDispos as $ref_sci) : ?>
<span class="referentiel">
<input type="radio" class="selection-referentiel" id="referentiel_<?= $ref_sci ?>" name="referentiel" value="<?= $ref_sci; ?>" <?= $premier_ref ? 'checked="checked"' : ""; ?> />
<label for="referentiel_<?= $ref_sci; ?>"><?= $ref_sci; ?></label>
</span>
<?php $premier_ref = false; ?>
<?php endforeach; ?>
</div>
<span class="zone-choix-type-nom">
<span class="type-nom">
<input type="radio" id="type_nom_scientifique" name="type_nom" value="nom_scientifique" checked="checked" />
<label for="type_nom_scientifique">Nom scientifique</label>
</span>
<span class="type-nom">
<input type="radio" id="type_nom_vernaculaire" name="type_nom" value="nom_vernaculaire" />
<label for="type_nom_vernaculaire" title="(en français, allemand, anglais, catalan, espagnol, italien ou néerlandais)">Nom commun</label>
</span>
</span>
<input type="text" aria-haspopup="true" aria-autocomplete="list" role="textbox" autocomplete="off" id="nom" name="nom" class="champ ui-autocomplete-input" size="30" maxlength="255" />
<span id="zone-liens-recherche">
<input type="hidden" id="eflore_nomenclature_niveau" name="niveau" value="2" />
<input type="hidden" id="eflore_nomenclature_module" name="module" value="recherche" />
<input type="hidden" id="eflore_nomenclature_action" name="action" value="rechercheSimple" />
<input type="submit" id="eflore_nomenclature_submit" name="submit" value="OK" class="ok" />
<input type="submit" id="eflore_nomenclature_fiche" name="acces_fiche" value="Accès fiche" />
</span>
</fieldset>
</form>
</div>
<!-- FIN FORM_NOM -->