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

Le mode d'affichage par défaut du calenrier interne passe à 'sans heure' car...

Le mode d'affichage par défaut du calenrier interne passe à 'sans heure' car les nouveaux arrivants n'ont pas de rdv et du coup l'information utile (les publications) n'était pas visibles car bien en dessous du cadre. Ajout d'une bardée de constantes en début de fichier pour choisir facilement une autre option initiale.
parent 03484b8d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -42,7 +42,7 @@ function exec_calendrier_dist() ...@@ -42,7 +42,7 @@ function exec_calendrier_dist()
} }
$ancre = 'calendrier-1'; $ancre = 'calendrier-1';
$r = http_calendrier_init('', $type, '','',generer_url_ecrire('calendrier', ($type ? "type=$type" : '')) . "#$ancre"); $r = http_calendrier_init('', $type, '',DEFAUT_PARTIE,generer_url_ecrire('calendrier', ($type ? "type=$type" : '')) . "#$ancre");
if (_request('var_ajaxcharset')) ajax_retour($r); if (_request('var_ajaxcharset')) ajax_retour($r);
......
...@@ -26,6 +26,12 @@ charger_generer_url(); ...@@ -26,6 +26,12 @@ charger_generer_url();
define('DEFAUT_D_ECHELLE',120); # 1 pixel = 2 minutes define('DEFAUT_D_ECHELLE',120); # 1 pixel = 2 minutes
define('DEFAUT_PARTIE_M', "matin");
define('DEFAUT_PARTIE_S', "soir");
define('DEFAUT_PARTIE_T', "tout");
define('DEFAUT_PARTIE_R', "sansheure");
define('DEFAUT_PARTIE', DEFAUT_PARTIE_R);
// //
// Utilitaires sans html ni sql // Utilitaires sans html ni sql
// //
...@@ -166,6 +172,7 @@ function http_calendrier_init($time='', $ltype='', $lechelle='', $lpartie_cal='' ...@@ -166,6 +172,7 @@ function http_calendrier_init($time='', $ltype='', $lechelle='', $lpartie_cal=''
$annee = date("Y",$time); $annee = date("Y",$time);
if (!$ltype) $ltype = $type ? $type : 'mois'; if (!$ltype) $ltype = $type ? $type : 'mois';
if (!$lechelle) $lechelle = $echelle; if (!$lechelle) $lechelle = $echelle;
if (!$lpartie_cal) $lpartie_cal = $partie_cal; if (!$lpartie_cal) $lpartie_cal = $partie_cal;
list($script, $ancre) = list($script, $ancre) =
calendrier_retire_args_ancre($script); calendrier_retire_args_ancre($script);
...@@ -374,7 +381,7 @@ function http_calendrier_semaine($annee, $mois, $jour, $echelle, $partie_cal, $s ...@@ -374,7 +381,7 @@ function http_calendrier_semaine($annee, $mois, $jour, $echelle, $partie_cal, $s
if (is_array($evt)) if (is_array($evt))
{ {
if($partie_cal!='sansheure'){ if($partie_cal!= DEFAUT_PARTIE_R){
$sd = http_calendrier_sans_date($annee, $mois,$evt[0]); $sd = http_calendrier_sans_date($annee, $mois,$evt[0]);
$finurl = "&echelle=$echelle&partie_cal=$partie_cal"; $finurl = "&echelle=$echelle&partie_cal=$partie_cal";
$evt = $evt =
...@@ -536,7 +543,7 @@ function http_calendrier_jour_sept($annee, $mois, $jour, $echelle, $partie_cal, ...@@ -536,7 +543,7 @@ function http_calendrier_jour_sept($annee, $mois, $jour, $echelle, $partie_cal,
global $spip_ecran; global $spip_ecran;
$gauche = (_DIR_RESTREINT || ($spip_ecran != "large")); $gauche = (_DIR_RESTREINT || ($spip_ecran != "large"));
if ($partie_cal!="sansheure") if ($partie_cal!= DEFAUT_PARTIE_R)
return return
"<tr class='calendrier-verdana10'>" . "<tr class='calendrier-verdana10'>" .
# afficher en reduction le tableau du jour precedent # afficher en reduction le tableau du jour precedent
...@@ -595,10 +602,10 @@ function http_calendrier_ics($annee, $mois, $jour,$echelle, $partie_cal, $large ...@@ -595,10 +602,10 @@ function http_calendrier_ics($annee, $mois, $jour,$echelle, $partie_cal, $large
global $spip_lang_left; global $spip_lang_left;
// tableau // tableau
if ($partie_cal == "soir") { if ($partie_cal == DEFAUT_PARTIE_M) {
$debut = 12; $debut = 12;
$fin = 23; $fin = 23;
} else if ($partie_cal == "matin") { } else if ($partie_cal == DEFAUT_PARTIE_M) {
$debut = 4; $debut = 4;
$fin = 15; $fin = 15;
} else { } else {
...@@ -938,27 +945,27 @@ function http_calendrier_navigation($annee, $mois, $jour, $echelle, $partie_cal, ...@@ -938,27 +945,27 @@ function http_calendrier_navigation($annee, $mois, $jour, $echelle, $partie_cal,
. (!isset($couleur_foncee) ? "" : "\nstyle='background-color: $couleur_foncee;'") . (!isset($couleur_foncee) ? "" : "\nstyle='background-color: $couleur_foncee;'")
. ">\n<div style='float: $spip_lang_right; padding-left: 5px; padding-right: 5px;'>" . ">\n<div style='float: $spip_lang_right; padding-left: 5px; padding-right: 5px;'>"
. (($type == "mois") ? '' : . (($type == "mois") ? '' :
(calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=sansheure", $ancre, (calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=" . DEFAUT_PARTIE_R, $ancre,
"sans-heure.gif", "sans-heure.gif",
_T('sans_heure'), _T('sans_heure'),
"calendrier-png" . "calendrier-png" .
(($partie_cal == "sansheure") ? " calendrier-opacity'" : "")) (($partie_cal == DEFAUT_PARTIE_R) ? " calendrier-opacity'" : ""))
. calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=tout", $ancre, . calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=" . DEFAUT_PARTIE_T, $ancre,
"heures-tout.png", "heures-tout.png",
_T('cal_jour_entier'), _T('cal_jour_entier'),
"calendrier-png" . "calendrier-png" .
(($partie_cal == "tout") ? " calendrier-opacity'" : "")) (($partie_cal == DEFAUT_PARTIE_T) ? " calendrier-opacity'" : ""))
. calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=matin", $ancre, . calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=" . DEFAUT_PARTIE_M, $ancre,
"heures-am.png", "heures-am.png",
_T('cal_matin'), _T('cal_matin'),
"calendrier-png" . "calendrier-png" .
(($partie_cal == "matin") ? " calendrier-opacity'" : "")) (($partie_cal == DEFAUT_PARTIE_M) ? " calendrier-opacity'" : ""))
. calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=soir", $ancre, . calendrier_href($script, $annee, $mois, $jour, $type, "&amp;echelle=$echelle&amp;partie_cal=" . DEFAUT_PARTIE_S, $ancre,
"heures-pm.png", "heures-pm.png",
_T('cal_apresmidi'), _T('cal_apresmidi'),
"calendrier-png" . "calendrier-png" .
(($partie_cal == "soir") ? " calendrier-opacity'" : "")) (($partie_cal == DEFAUT_PARTIE_S) ? " calendrier-opacity'" : ""))
. "&nbsp;" . "&nbsp;"
. calendrier_href($script, $annee, $mois, $jour, $type, "&amp;partie_cal=$partie_cal&amp;echelle=" . floor($echelle * 1.5), . calendrier_href($script, $annee, $mois, $jour, $type, "&amp;partie_cal=$partie_cal&amp;echelle=" . floor($echelle * 1.5),
$ancre, $ancre,
......
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