Subversion Repositories Sites.outils-naturalistes.fr

Compare Revisions

Ignore whitespace Rev 7 → Rev 8

/trunk/spip/squelettes/js/application.js
10,4 → 10,156
loading_image : 'squelettes/images/loading.gif',
close_image : 'squelettes/images/closelabel.gif'
})
})
})
 
 
function changerAccordeonOuOnglets(ongletId) {
 
i = 0 ;
max = $(".lien_onglet").length ;
if(consultation) {
 
$("#lien_onglet_0").parent().nextAll().each(function () {
$(this).hide();
});
 
$("#lien_onglet_"+ongletId).parent().nextAll().each(function () {
$(this).show();
});
 
$("#lien_onglet_"+(ongletId+1)).parent().nextAll().each(function () {
$(this).hide();
});
 
for(i = 0 ; i <= max ; i++) {
$("#lien_onglet_"+i).parent().show();
$("#lien_onglet_"+i).removeClass("item_actif")
}
 
$("#lien_onglet_"+ongletId).addClass("item_actif");
$("#fin_onglet").parent().nextAll().each(function () {
$(this).show();
});
}
else {
 
$("#lien_onglet_0").parent().parent().nextAll().each(function () {
$(this).hide();
});
 
$("#lien_onglet_"+ongletId).parent().parent().nextAll().each(function () {
$(this).show();
});
 
$("#lien_onglet_"+(ongletId+1)).parent().parent().nextAll().each(function () {
$(this).hide();
});
 
for(i = 0 ; i <= max ; i++) {
$("#onglet_"+i).removeClass("onglet_actif");
}
 
$("#onglet_"+ongletId).addClass("onglet_actif") ;
//window.alert("l'onglet avec id "+"#lien_onglet_"+ongletId+"prend la classe item_actif");
$("#fin_onglet").parent().parent().nextAll().each(function () {
$(this).show();
});
}
}
 
function ajouterAccordeonOuOnglets() {
 
onglets = $(".lien_onglet") ;
consultation = false;
 
fiche_consultation = $(".BAZ_fiche_titre_application");
bouton_valider = $("input[name=\"valider\"]");
if(fiche_consultation.length != 0 || bouton_valider.html() == null) {
consultation = true ;
}
else {
htmlOnglets = '<div id="selecteur_onglets" class="onglets"> <ul id="liste_onglets">';
}
 
for(i = 0 ; i < onglets.length; i++)
{
lienEnCours = onglets[i];
lienEnCours.setAttribute("id","lien_onglet_"+(i));
if(!consultation) {
htmlOnglets += '<li><a id="onglet_'+i+'" href="javascript:changerAccordeonOuOnglets('+i+','+consultation+');">'+$('#lien_onglet_'+(i)).html()+'</a></li>';
}
}
if(!consultation) {
htmlOnglets += '</ul></div><hr style="clear: both; visibility: hidden">' ;
$("#formulaire").before(htmlOnglets);
$(".lien_onglet").parent().hide();
$("input[type=\"submit\"][name=\"valider\"]").bind("click",function(event)
{
event.preventDefault();
validerFormulaire(true);
});
$("input[type=\"submit\"][name=\"valider\"]").before("<input type=\"button\" id=\"sauvegarde_form\" onclick=\"validerFormulaire(false)\" value=\"sauvegarder\" />")
}
else
{
lien_ici = '<li><a id="onglet_lien_ici" href="#">Application</a></li>' ;
lien_forge = $("#bf_lien_forge_description");
lien_demo = $("#bf_lien_demo_description");
lien_forum = $("#bf_lien_forum_description");
htmlOnglets = '<div id="selecteur_onglets" class="onglets"> <ul id="liste_onglets">';
htmlOnglets += lien_ici ;
htmlOnglets += '<li><a id="onglet_lien_forum" href="http://'+lien_forum.html().replace(/^\s*|\s*$/g,'')+'">Liste de discussion</a></li>' ;
htmlOnglets += '<li><a id="onglet_lien_demo" href="http://'+lien_demo.html().replace(/^\s*|\s*$/g,'')+'">Espace d&eacute;mo</a></li>' ;
htmlOnglets += '<li><a id="onglet_lien_forge" href="http://'+lien_forge.html().replace(/^\s*|\s*$/g,'')+'">T&eacute;l&eacute;chargement et forge</a></li>' ;
htmlOnglets += '</ul></div><hr style="clear: both; visibility: hidden">' ;
titres_appli = $(".BAZ_titre_application") ;
titre_appli = titres_appli[0];
titre_appli.setAttribute("id","lien_onglet_ext");
$("#lien_onglet_ext").after(htmlOnglets);
lien_demo.hide();
lien_forge.hide();
lien_forum.hide();
$("#bf_lien_forge_rubrique").hide();
$("#bf_lien_demo_rubrique").hide();
$("#bf_lien_forum_rubrique").hide();
$("#lien_onglet_ext").hide();
}
$(".BAZ_bulle_corps_application").before('<hr style="clear: both; visibility: hidden">');
 
for(j = 0 ; j < onglets.length; j++)
{
ajouterListenersAccordeonOuOnglets(j,consultation) ;
}
 
changerAccordeonOuOnglets(0,consultation);
}
 
function ajouterListenersAccordeonOuOnglets(id,consultation) {
if(consultation) {
$("#lien_onglet_"+id).bind("click", function() {changerAccordeonOuOnglets(id,consultation);});
}
}
 
function validerFormulaire(verifier) {
if(verifier == true) {
try { if(validate_formulaire(document.getElementById("formulaire"))) { $("#formulaire").submit();} } catch(e) { window.alert(e.message); return true; };
}
else {
$("#formulaire").submit();
}
}
 
$(document).ready(ajouterAccordeonOuOnglets);
/trunk/spip/squelettes/css/bazar.css
New file
0,0 → 1,207
.BAZ_titre_liste {font-size:14px; font-weight:bold; }
.symbole_obligatoire {color:red;}
#BAZ_corps {width:100%;}
.BAZ_liste_rss {padding:0; margin:0; display:inline; list-style:none; list-style-type:none; background:#FFF; background-image:none;}
#formulaire input, #formulaire textarea, #formulaire select {border:1px solid #000;}
#formulaire table, #formulaire td {border:0;}
#BAZ_menu {display:block;margin:0 0 10px 0; padding:0; width:650px; float:right; }
#BAZ_menu li {padding:0; margin:5px 10px 0 0; display:block; float:left; list-style:none; list-style-type:none; background:#A8CB3D;-moz-border-radius:6px; width:140px; text-align:center; background-image:none;}
#BAZ_menu a {color:#FFF;}
.BAZ_info {background:#fff no-repeat;border:1px solid #3399cc; padding: 7px 7px 6px 36px; margin:10px 0 5px 0; font-size:9px; background-position-x:15px; background-position-y:center;}
.BAZ_label {font-weight:bold; text-align:left; width:250px; display:block;float:left; margin:0 10px 0 0;clear:left;}
/*-------------Les fiches Bazar-------------------------------------------------*/
.BAZ_cadre_fiche {padding:5px; border: 0px solid #33641e; text-align:justify;
display:block;float:right;width:600}
 
.BAZ_rubrique {margin:5px 0 5px 0; clear:left;}
 
.BAZ_liste {margin:5px 0 5px 0; clear:left;}
 
#titre_bazar { clear:right;}
 
input[type="hidden"] {
border: none !important;
}
 
.BAZ_cadre_fiche a {color:#3082AA;text-decoration:underline;}
.BAZ_cadre_fiche a:hover {color:#515966;text-decoration:underline;}
.BAZ_cadre_fiche .BAZ_fiche_titre {
border-bottom:2px dotted #FFA300;
color:#FFA300;
margin:0 0 10px;
padding:5px 0 0 40px;
}
.BAZ_image {float:right;height:150px; width:150px; padding:10px;}
#BAZ_description {min-height:120px;font: 15px arial, sans-serif;text-align:justify;}
#BAZ_bas_page {margin: 0;padding:0;}
.bulle_haut {margin: 0;padding:0;}
.bulle_corps {margin: 0;padding:10px 5px;border: 1px solid #3082AA;-moz-border-radius:10px;background:#DBE8C8;}
.bulle_bas {margin: 0;padding:0;}
.centrer {clear:both;margin:0 auto;}
.rubrique {width:150px; text-align:left;font: bold 15px arial, sans-serif; color: #515966;}
.rubrique_bulle {width:90px;text-align:left;font: bold 15px arial, sans-serif; color: #000;}
.infos {width:70%;float:left;min-height:120px;font: bold 15px arial, sans-serif; color: #B1BB7E;line-height: 25px;}
.bazar_checkbox {float:left;width:100px;font:10px arial, sans-serif;border:0;}
.lien_wikini {margin: 0;padding:10px 5px;border: 2px solid #DBE8C8;-moz-border-radius:10px;background:#3082AA;}
div.lien_wikini a {padding-left:100px;color:#FFFFFF;}
.table_bazar th{font-weight:bold;}
.table_bazar #col1,.table_bazar #col2,.table_bazar #col3,.table_bazar #col4{text-align:center;}
 
/* CALENDRIER APPLETTE*/
.calendrier_applette{
width:140px;}
 
/* CALENDRIER */
#cal_entete{
display:block;
margin:10px 0;
width:100%;
}
#cal_navigation{
display:block;
float:left;
background:transparent;
}
.tc_lien {float:right;}
#cal_precedent_lien, #cal_suivant_lien {
display:block;
float:left;
background:transparent;}
#cal_suivant_lien img, #cal_precedent_lien img{
display:block;
float:left;
border:0;}
#cal_mois_courrant{
display:block;
float:left;
width:120px;
margin:2px 0;
padding:2px 15px;
text-align:center;
border:1px solid #CCCCCC;
text-transform:uppercase;
font-weight: bold;
font-size: 14px;}
 
.calendrier{
clear:both;
margin:5px 0;
font-weight:bold;
font-size:14px;
border-collapse:collapse;
border-spacing:0;
width:100%;}
.calendrier th, .calendrier_applette th {
color:white;
background-color:#3b7322;
border: 1px solid #33641e;
text-align:center;}
.calendrier th {
height:20px;
width:14%;
border-width:1px;}
.calendrier td {
height:83px;
width:14%;
border:1px solid #33641e;
vertical-align:top;
text-align:left;}
.cal_samedi, .cal_dimanche{
background-color:#fff9e7;}
.cal_j{
display:block;
float:right;
padding:1px;
font-size:8px;}
.cal_jc{
background-color:#c4d9fb;}
.cal_ma{
background-color:#eaeaec;}
.cal_evenemt_liste {
font-size:9px;
margin:20px 0 0 0;
width:100%;
padding:0;}
.cal_evenemt_liste li{
display:block;
background:transparent 0 4px no-repeat;
margin:0;padding:0;}
 
.cal_evenemt_liste a {
display:block;
width:100%;
font-size:9px;
margin:0;
padding:0 0 0 12px;}
/** ONGLETS **/
.onglet_visible {
display: block;
}
 
.onglet_cache, #fin_onglet {
display: none;
}
 
.onglets > ul a {
width:auto;
}
 
.lien_onglet {
display: block;
padding: 4px 5px;
text-decoration: none;
width: 450px;
font-size: 1.5em;
margin-top: 3px;
margin-bottom: 3px;
text-decoration:none;
}
 
a.lien_onglet {
color:#0A8D37;
}
 
.item_actif {
text-decoration: underline;
}
 
.onglets li {
background:transparent url(../images/norm_right_both.gif) no-repeat scroll right top;
float:left;
margin:0;
padding:0;
}
 
.onglets ul li a {
background:transparent url(../images/norm_left_both.gif) no-repeat scroll left top;
display:block;
float:left;
padding:5px 14px 4px;
text-decoration:none;
white-space:nowrap;
font-size:12px;
color:#0A8D37;
}
 
.onglets ul {
list-style-image:none;
list-style-position:outside;
list-style-type:none;
margin: 10px 0 10px 0;
}
 
.onglets {
font-weight:bold;
text-align:left;
}
 
#sauvegarde_form {
margin-right: 3px;
}
 
.onglet_actif, #onglet_lien_ici {
color:#333333 !important;
padding-bottom:5px;
}