Skip to content
Extraits de code Groupes Projets
Valider 3d5baf8d rédigé par esj's avatar esj
Parcourir les fichiers

deport de style vers la css

parent 26d7b420
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -74,7 +74,6 @@ a.calendrier-annee:hover { ...@@ -74,7 +74,6 @@ a.calendrier-annee:hover {
.calendrier-td { .calendrier-td {
width: 14%; width: 14%;
vertical-align: top; vertical-align: top;
background-color: #eeeeee;
} }
.calendrier-th { .calendrier-th {
...@@ -141,9 +140,11 @@ a.calendrier-annee:hover { ...@@ -141,9 +140,11 @@ a.calendrier-annee:hover {
.calendrier-cadreagenda { .calendrier-cadreagenda {
visibility: hidden; visibility: hidden;
width: 100%; width: 100%;
position: absolute;
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
border: 0px; border: 0px;
background-color: white;
-moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomleft: 8px;
-moz-border-radius-bottomright: 8px; -moz-border-radius-bottomright: 8px;
} }
......
...@@ -199,6 +199,7 @@ elseif ($type == 'jour') { ...@@ -199,6 +199,7 @@ elseif ($type == 'jour') {
function http_calendrier_mois($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt) function http_calendrier_mois($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt)
{ {
global $spip_ecran; global $spip_ecran;
if (!isset($spip_ecran)) $spip_ecran = 'large';
list($sansduree, $evenements, $premier_jour, $dernier_jour) = $evt; list($sansduree, $evenements, $premier_jour, $dernier_jour) = $evt;
...@@ -266,6 +267,7 @@ function http_calendrier_mois_navigation($annee, $mois, $premier_jour, $dernier_ ...@@ -266,6 +267,7 @@ function http_calendrier_mois_navigation($annee, $mois, $premier_jour, $dernier_
function http_calendrier_mois_noms($annee, $mois, $jour, $script, $ancre){ function http_calendrier_mois_noms($annee, $mois, $jour, $script, $ancre){
global $couleur_claire; global $couleur_claire;
$bandeau =""; $bandeau ="";
for ($j=1; $j<8;$j++){ for ($j=1; $j<8;$j++){
$bandeau .= $bandeau .=
...@@ -273,7 +275,9 @@ function http_calendrier_mois_noms($annee, $mois, $jour, $script, $ancre){ ...@@ -273,7 +275,9 @@ function http_calendrier_mois_noms($annee, $mois, $jour, $script, $ancre){
_T('date_jour_' . (($j%7)+1)) . _T('date_jour_' . (($j%7)+1)) .
"</th>"; "</th>";
} }
return "\n<tr style='background-color: $couleur_claire'>$bandeau\n</tr>"; return "\n<tr" .
(!isset($couleur_claire) ? "" : " style='background-color: $couleur_claire'") .
">$bandeau\n</tr>";
} }
# dispose les lignes d'un calendrier de 7 colonnes (les jours) # dispose les lignes d'un calendrier de 7 colonnes (les jours)
...@@ -304,7 +308,7 @@ function http_calendrier_mois_sept($annee, $mois, $premier_jour, $dernier_jour,$ ...@@ -304,7 +308,7 @@ function http_calendrier_mois_sept($annee, $mois, $premier_jour, $dernier_jour,$
$couleur_fond = ""; $couleur_fond = "";
if ($jour_semaine == 0) { if ($jour_semaine == 0) {
$couleur_fond = " background-color: $couleur_claire;"; $couleur_fond = $couleur_claire;
} else { } else {
if ($jour_semaine==1) if ($jour_semaine==1)
{ {
...@@ -316,7 +320,7 @@ function http_calendrier_mois_sept($annee, $mois, $premier_jour, $dernier_jour,$ ...@@ -316,7 +320,7 @@ function http_calendrier_mois_sept($annee, $mois, $premier_jour, $dernier_jour,$
if ($amj == date("Ymd")) { if ($amj == date("Ymd")) {
$couleur_lien = "red"; $couleur_lien = "red";
$couleur_fond = " background-color: white;"; $couleur_fond = "white";
} }
$evts = $evenements[$amj]; $evts = $evenements[$amj];
if ($evts) { if ($evts) {
...@@ -333,7 +337,9 @@ function http_calendrier_mois_sept($annee, $mois, $premier_jour, $dernier_jour,$ ...@@ -333,7 +337,9 @@ function http_calendrier_mois_sept($annee, $mois, $premier_jour, $dernier_jour,$
} }
$ligne .= "\n\t\t<td\tclass='calendrier-td' $ligne .= "\n\t\t<td\tclass='calendrier-td'
style='height: 100px;$couleur_fond border-bottom: 1px solid $couleur_claire; border-$spip_lang_right: 1px solid $couleur_claire;$border_left'>" . style='height: 100px; border-bottom: 1px solid $couleur_claire; border-$spip_lang_right: 1px solid $couleur_claire;" .
($couleur_fond ? " background-color: $couleur_fond;" : "") .
"$border_left'>" .
http_calendrier_mois_clics($annee_en_cours, $mois_en_cours, $jour, $script, $ancre, $couleur_lien) . http_calendrier_mois_clics($annee_en_cours, $mois_en_cours, $jour, $script, $ancre, $couleur_lien) .
$evts . $evts .
"\n\t</td>"; "\n\t</td>";
...@@ -375,6 +381,7 @@ function http_calendrier_mois_clics($annee, $mois, $jour, $script, $ancre, $colo ...@@ -375,6 +381,7 @@ function http_calendrier_mois_clics($annee, $mois, $jour, $script, $ancre, $colo
function http_calendrier_semaine($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt) function http_calendrier_semaine($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt)
{ {
global $spip_ecran; global $spip_ecran;
if (!isset($spip_ecran)) $spip_ecran = 'large';
$init = date("w",mktime(1,1,1,$mois,$jour,$annee)); $init = date("w",mktime(1,1,1,$mois,$jour,$annee));
$init = $jour+1-($init ? $init : 7); $init = $jour+1-($init ? $init : 7);
...@@ -424,7 +431,7 @@ calendrier_args_date($fannee, $fmois, ($fjour+1)), ...@@ -424,7 +431,7 @@ calendrier_args_date($fannee, $fmois, ($fjour+1)),
} }
function http_calendrier_semaine_noms($annee, $mois, $jour, $script, $ancre){ function http_calendrier_semaine_noms($annee, $mois, $jour, $script, $ancre){
global $couleur_claire, $spip_ecran; global $couleur_claire;
$href = $script . $href = $script .
(ereg('[?&]$', $script) ? '' : (strpos($script,'?') ? '&' : '?')) . (ereg('[?&]$', $script) ? '' : (strpos($script,'?') ? '&' : '?')) .
"type=jour&"; "type=jour&";
...@@ -450,7 +457,9 @@ function http_calendrier_semaine_noms($annee, $mois, $jour, $script, $ancre){ ...@@ -450,7 +457,9 @@ function http_calendrier_semaine_noms($annee, $mois, $jour, $script, $ancre){
'color:black;') . 'color:black;') .
"</th>"; "</th>";
} }
return "\n<tr style='background-color: $couleur_claire'>$bandeau\n</tr>" ; return "\n<tr" .
(!isset($couleur_claire) ? "" : " style='background-color: $couleur_claire'") .
">$bandeau\n</tr>";
} }
function http_calendrier_semaine_sept($annee, $mois, $jour, $echelle, $partie_cal, $evt) function http_calendrier_semaine_sept($annee, $mois, $jour, $echelle, $partie_cal, $evt)
...@@ -461,16 +470,13 @@ function http_calendrier_semaine_sept($annee, $mois, $jour, $echelle, $partie_ca ...@@ -461,16 +470,13 @@ function http_calendrier_semaine_sept($annee, $mois, $jour, $echelle, $partie_ca
$today=date("Ymd"); $today=date("Ymd");
$total = ''; $total = '';
$style = "border-$spip_lang_left: 1px solid $couleur_claire; border-bottom: 1px solid $couleur_claire;";
for ($j=$jour; $j<$jour+7;$j++){ for ($j=$jour; $j<$jour+7;$j++){
$v = mktime(0,0,0,$mois, $j, $annee); $v = mktime(0,0,0,$mois, $j, $annee);
$total .= "\n<td class='calendrier-td'>" . $total .= "\n<td class='calendrier-td'>" .
http_calendrier_ics($annee,$mois,$j, $echelle, $partie_cal, $largeur, $evt, http_calendrier_ics($annee,$mois,$j, $echelle, $partie_cal, $largeur, $evt, ($style . ( (date("w",$v)==0 && isset($couleur_claire)) ?
(" background-color: " . " background-color: $couleur_claire;" :
((!date("w",$v)) ? ((date("Ymd", $v) == $today) ? " background-color: white;" : "")))) .
$couleur_claire :
((date("Ymd", $v) == $today) ? "white" :
"#eeeeee")) .
"; border-$spip_lang_left: 1px solid $couleur_claire; border-bottom: 1px solid $couleur_claire;")) .
"\n</td>"; "\n</td>";
} }
return "\n<tr class='calendrier-verdana10'>$total</tr>"; return "\n<tr class='calendrier-verdana10'>$total</tr>";
...@@ -479,10 +485,10 @@ function http_calendrier_semaine_sept($annee, $mois, $jour, $echelle, $partie_ca ...@@ -479,10 +485,10 @@ function http_calendrier_semaine_sept($annee, $mois, $jour, $echelle, $partie_ca
function http_calendrier_jour($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt){ function http_calendrier_jour($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt){
global $spip_ecran; global $spip_ecran;
if (!isset($spip_ecran)) $spip_ecran = 'large';
return return
"\n<table class='calendrier-table-$spip_ecran'>" . "\n<table class='calendrier-table-$spip_ecran'>" .
"\n<tr>" . "<td class='calendrier-td-gauche'></td>" . "\n<tr><td class='calendrier-td-gauche'></td>" .
"<td colspan='5' class='calendrier-td-centre'>" . "<td colspan='5' class='calendrier-td-centre'>" .
http_calendrier_navigation($annee, $mois, $jour, $echelle, $partie_cal, http_calendrier_navigation($annee, $mois, $jour, $echelle, $partie_cal,
(nom_jour("$annee-$mois-$jour") . " " . (nom_jour("$annee-$mois-$jour") . " " .
...@@ -994,13 +1000,12 @@ calendrier_args_date($annee_today, $mois_today, $jour_today) . ...@@ -994,13 +1000,12 @@ calendrier_args_date($annee_today, $mois_today, $jour_today) .
function http_calendrier_invisible($annee, $mois, $jour, $script, $ancre, $id) function http_calendrier_invisible($annee, $mois, $jour, $script, $ancre, $id)
{ {
global $spip_lang_right, $spip_lang_left, $couleur_claire; global $spip_lang_right, $spip_lang_left, $couleur_claire;
if (!isset($couleur_claire)) $couleur_claire = 'white';
$gadget = "<div style='position: relative;z-index: 1000;' $gadget = "<div style='position: relative;z-index: 1000;'
onmouseover=\"montrer('$id');\" onmouseover=\"montrer('$id');\"
onmouseout=\"cacher('$id');\">"; onmouseout=\"cacher('$id');\">"
. "<table id='$id' class='calendrier-cadreagenda'"
$gadget .= "<table id='$id' class='calendrier-cadreagenda' style='position: absolute; background-color: $couleur_claire'>"; . (!isset($couleur_claire) ? "" : " style='background-color: $couleur_claire'")
$gadget .= "\n<tr><td colspan='3' style='text-align:$spip_lang_left;'>"; . ">\n<tr><td colspan='3' style='text-align:$spip_lang_left;'>";
$annee_avant = $annee - 1; $annee_avant = $annee - 1;
$annee_apres = $annee + 1; $annee_apres = $annee + 1;
...@@ -1084,8 +1089,7 @@ function http_calendrier_clic($annee, $mois, $jour, $type, $couleur, $perso) ...@@ -1084,8 +1089,7 @@ function http_calendrier_clic($annee, $mois, $jour, $type, $couleur, $perso)
function http_calendrier_agenda_rv ($annee, $mois, $les_rv, $fclic, $perso='', function http_calendrier_agenda_rv ($annee, $mois, $les_rv, $fclic, $perso='',
$jour_ved='', $mois_ved='', $annee_ved='', $jour_ved='', $mois_ved='', $annee_ved='',
$semaine='') { $semaine='') {
global $couleur_foncee; global $couleur_foncee, $spip_lang_left, $spip_lang_right;
global $spip_lang_left, $spip_lang_right;
// Former une date correcte (par exemple: $mois=13; $annee=2003) // Former une date correcte (par exemple: $mois=13; $annee=2003)
$date_test = date("Y-m-d", mktime(0,0,0,$mois, 1, $annee)); $date_test = date("Y-m-d", mktime(0,0,0,$mois, 1, $annee));
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter