Skip to content
Extraits de code Groupes Projets
Valider 43b05a92 rédigé par cerdic's avatar cerdic
Parcourir les fichiers

evacuation de toiles, et de la fonction bandeau_titre_boite2 en vieille def

les differences de style entre boites sont traitees en css, pas en php
parent ea5b646d
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -350,7 +350,8 @@ div.navigation-calendrier img { ...@@ -350,7 +350,8 @@ div.navigation-calendrier img {
} }
/* agenda */ /* agenda */
.bandeau_agenda { background:#ddd;} .bandeau_agenda { background:#ddd;}
.jour_dimanche { background:#eee;} .jour_dimanche { background:#eee;color:#000;}
.jour_encours { background:#fff;} .jour_encours { background:#fff;color:#000;}
.jour_gris { background:#eee;} .jour_gris { background:#eee;color:#000;}
.jour_pris { background:#fff;color:#000;}
.calendrier-cadreagenda { background:#eee;} .calendrier-cadreagenda { background:#eee;}
\ No newline at end of file
...@@ -289,11 +289,16 @@ a.lien_sous:hover { ...@@ -289,11 +289,16 @@ a.lien_sous:hover {
color: #000; color: #000;
} }
.cadre-bandeau-rubriques {
div.bandeau_rubriques {
background-color: #eee; background-color: #eee;
border: 1px solid #555555; border: 1px solid #555555;
z-index: 1;
} }
.cadre-bandeau-rubriques .titrem { background : #GET{foncee};}
.cadre-bandeau-rubriques .cadre_padding {padding:0px;}
.cadre-meme-rubriques { background:#eee;border:1px solid #444;}
.cadre-meme-rubriques .cadre_padding {padding:0px;}
a.bandeau_rub { a.bandeau_rub {
display: block; display: block;
font-size: 10px; font-size: 10px;
...@@ -1788,12 +1793,14 @@ td.message, a.message { ...@@ -1788,12 +1793,14 @@ td.message, a.message {
.couleur_cumul {background:#666;} .couleur_cumul {background:#666;}
.couleur_nombre {background:#eee;} .couleur_nombre {background:#eee;}
.couleur_langue {background:#GET{foncee};}
/* agenda */ /* agenda */
.bandeau_agenda { background:#GET{claire};} .bandeau_agenda { background:#GET{claire};}
.jour_dimanche { background:#GET{claire};} .jour_dimanche { background:#GET{claire};color:#fff;}
.jour_encours { background:#fff;} .jour_encours { background:#fff;color:#000;}
.jour_gris { background:#eee;} .jour_gris { background:#eee;color:#000;}
.jour_pris { background:#fff;color:#000;}
.calendrier-cadreagenda { background:#GET{claire};} .calendrier-cadreagenda { background:#GET{claire};}
/* lang_raccourcis */ /* lang_raccourcis */
......
...@@ -26,9 +26,7 @@ function exec_menu_navigation_dist() { ...@@ -26,9 +26,7 @@ function exec_menu_navigation_dist() {
if (spip_num_rows($vos_articles) > 0) { if (spip_num_rows($vos_articles) > 0) {
$t = _T('info_en_cours_validation'); $t = _T('info_en_cours_validation');
$gadget .= "<div>&nbsp;</div>" $gadget .= debut_cadre('bandeau-rubriques',"article-24.gif",'',afficher_plus(generer_url_ecrire("articles_page")).$t)
. "<div class='bandeau_rubriques' style='z-index: 1;'>"
. bandeau_titre_boite2(afficher_plus(generer_url_ecrire('articles_page')) . '<b>' . $t . '</b>', "article-24.gif", 'toile_foncee', 'ligne_blanche')
. "\n<div class='plan-articles'>\n"; . "\n<div class='plan-articles'>\n";
while($row = spip_fetch_array($vos_articles)) { while($row = spip_fetch_array($vos_articles)) {
$id_article = $row['id_article']; $id_article = $row['id_article'];
...@@ -37,31 +35,26 @@ function exec_menu_navigation_dist() { ...@@ -37,31 +35,26 @@ function exec_menu_navigation_dist() {
$gadget .= "<a class='$statut spip_xx-small' href='" . generer_url_ecrire("articles","id_article=$id_article") . "'>$titre</a>\n"; $gadget .= "<a class='$statut spip_xx-small' href='" . generer_url_ecrire("articles","id_article=$id_article") . "'>$titre</a>\n";
} }
$gadget .= "</div>"; $gadget .= "</div>";
$gadget .= "</div>"; $gadget .= fin_cadre('bandeau-rubriques');
} }
$vos_articles = spip_query("SELECT id_article, id_rubrique, titre, statut FROM spip_articles WHERE statut='prop' ORDER BY date DESC LIMIT 5"); $vos_articles = spip_query("SELECT id_article, id_rubrique, titre, statut FROM spip_articles WHERE statut='prop' ORDER BY date DESC LIMIT 5");
if (spip_num_rows($vos_articles) > 0) { if (spip_num_rows($vos_articles) > 0) {
$gadget .= "<div>&nbsp;</div>"; $gadget .= debut_cadre('bandeau-rubriques',"article-24.gif",'',afficher_plus(generer_url_ecrire())._T('info_articles_proposes'));
$gadget .= "<div class='bandeau_rubriques' style='z-index: 1;'>";
$gadget .= bandeau_titre_boite2(afficher_plus(generer_url_ecrire()) . '<b>' . _T('info_articles_proposes') . '</b>', "article-24.gif", 'toile_foncee', 'ligne_blanche');
$gadget .= "<div class='plan-articles'>"; $gadget .= "<div class='plan-articles'>";
while($row = spip_fetch_array($vos_articles)) { while($row = spip_fetch_array($vos_articles)) {
$id_article = $row['id_article']; $id_article = $row['id_article'];
$titre = sinon($row['titre'], _T('ecrire:info_sans_titre')); $titre = sinon($row['titre'], _T('ecrire:info_sans_titre'));
$statut = $row['statut']; $statut = $row['statut'];
$gadget .= "<a class='$statut' href='" . generer_url_ecrire("articles","id_article=$id_article") . "'>$titre</a>";
$gadget .= "<a class='$statut spip_xx-small' href='" . generer_url_ecrire("articles","id_article=$id_article") . "'>$titre</a>";
} }
$gadget .= "</div>"; $gadget .= "</div>";
$gadget .= "</div>"; $gadget .= fin_cadre('bandeau-rubriques');
} }
$vos_articles = spip_query("SELECT * FROM spip_breves WHERE statut='prop' ORDER BY date_heure DESC LIMIT 5"); $vos_articles = spip_query("SELECT * FROM spip_breves WHERE statut='prop' ORDER BY date_heure DESC LIMIT 5");
if (spip_num_rows($vos_articles) > 0) { if (spip_num_rows($vos_articles) > 0) {
$gadget .= "<div>&nbsp;</div>"; $gadget .= debut_cadre('bandeau-rubriques',"breve-24.gif",'',afficher_plus(generer_url_ecrire("breves"))._T('info_breves_valider'));
$gadget .= "<div class='bandeau_rubriques' style='z-index: 1;'>";
$gadget .= bandeau_titre_boite2(afficher_plus(generer_url_ecrire("breves")).'<b>' . _T('info_breves_valider') . '</b>', "breve-24.gif", 'toile_foncee', 'ligne_blanche');
$gadget .= "<div class='plan-articles'>"; $gadget .= "<div class='plan-articles'>";
while($row = spip_fetch_array($vos_articles)) { while($row = spip_fetch_array($vos_articles)) {
$id_breve = $row['id_breve']; $id_breve = $row['id_breve'];
...@@ -71,7 +64,7 @@ function exec_menu_navigation_dist() { ...@@ -71,7 +64,7 @@ function exec_menu_navigation_dist() {
$gadget .= "<a class='$statut spip_xx-small' href='" . generer_url_ecrire("breves_voir","id_breve=$id_breve") . "'>$titre</a>"; $gadget .= "<a class='$statut spip_xx-small' href='" . generer_url_ecrire("breves_voir","id_breve=$id_breve") . "'>$titre</a>";
} }
$gadget .= "</div>"; $gadget .= "</div>";
$gadget .= "</div>"; $gadget .= fin_cadre('bandeau-rubriques');
} }
$result = spip_query("SELECT id_rubrique FROM spip_rubriques LIMIT 1"); $result = spip_query("SELECT id_rubrique FROM spip_rubriques LIMIT 1");
......
...@@ -104,10 +104,7 @@ $result = spip_query("SELECT auteurs.id_auteur, auteurs.nom, COUNT(*) AS total F ...@@ -104,10 +104,7 @@ $result = spip_query("SELECT auteurs.id_auteur, auteurs.nom, COUNT(*) AS total F
if (spip_num_rows($result) > 0) { if (spip_num_rows($result) > 0) {
echo "<div style='height: 12px;'></div>"; echo "<div style='height: 12px;'></div>";
echo "<div class='liste'>"; echo debut_cadre('liste',"redacteurs-24.gif",'',_T('info_principaux_correspondants'));
echo bandeau_titre_boite2('<b>' . _T('info_principaux_correspondants') . '</b>', "redacteurs-24.gif", 'toile_gris_sombre', 'ligne_blanche');
echo "<table width='100%' cellpadding='0' cellspacing='0'>"; echo "<table width='100%' cellpadding='0' cellspacing='0'>";
echo "<tr><td valign='top' style='width: 50%'>"; echo "<tr><td valign='top' style='width: 50%'>";
$count = 0; $count = 0;
...@@ -122,7 +119,7 @@ if (spip_num_rows($result) > 0) { ...@@ -122,7 +119,7 @@ if (spip_num_rows($result) > 0) {
if ($count == ceil(spip_num_rows($result)/2)) echo "</td><td valign='top' style='width: 50%' class='toile_gris_leger'>"; if ($count == ceil(spip_num_rows($result)/2)) echo "</td><td valign='top' style='width: 50%' class='toile_gris_leger'>";
} }
echo "</td></tr></table>"; echo "</td></tr></table>";
echo "</div>"; echo fin_cadre('liste');
} }
echo afficher_messages('<b>' . _T('info_pense_bete_ancien') . '</b>', '', "id_auteur=$connect_id_auteur AND statut='publie' AND type='pb' AND rv!='oui'", $messages_vus, false, false); echo afficher_messages('<b>' . _T('info_pense_bete_ancien') . '</b>', '', "id_auteur=$connect_id_auteur AND statut='publie' AND type='pb' AND rv!='oui'", $messages_vus, false, false);
......
...@@ -96,7 +96,7 @@ function exec_statistiques_lang_dist() ...@@ -96,7 +96,7 @@ function exec_statistiques_lang_dist()
echo "\n<table cellpadding='0' cellspacing='0' border='0' width='".($taille+5)."'>"; echo "\n<table cellpadding='0' cellspacing='0' border='0' width='".($taille+5)."'>";
echo "\n<tr><td style='align:$spip_lang_right; background-color: #eeeeee; border: 1px solid #999999; white-space: nowrap;'>"; echo "\n<tr><td style='align:$spip_lang_right; background-color: #eeeeee; border: 1px solid #999999; white-space: nowrap;'>";
if ($visites_abs > 0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' width='$visites_abs' height='8' alt=' ' />"; if ($visites_abs > 0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' width='$visites_abs' height='8' alt=' ' />";
if ($visites>0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' class='toile_foncee' style='border: 0px;' width='$visites' height='8' alt=' ' />"; if ($visites>0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' class='couleur_langue' style='border: 0px;' width='$visites' height='8' alt=' ' />";
echo "</td></tr></table>\n"; echo "</td></tr></table>\n";
echo "</td>"; echo "</td>";
......
...@@ -1134,21 +1134,17 @@ function http_calendrier_agenda_rv ($annee, $mois, $les_rv, $fclic, ...@@ -1134,21 +1134,17 @@ function http_calendrier_agenda_rv ($annee, $mois, $les_rv, $fclic,
$couleur = "black"; $couleur = "black";
} else { } else {
if ($j == $jour_today AND $cemois) { if ($j == $jour_today AND $cemois) {
$toile = test_espace_prive() ? 'toile_foncee' : 'toile_gris_sombre'; $toile = 'jour_encours';
$couleur = "white";
} else { } else {
if ($jour_semaine == 7) { if ($jour_semaine == 7) {
$toile = "toile_gris_fort"; $toile = "jour_dimanche";
$couleur = 'white';
} else { } else {
$toile = 'toile_blanche'; $toile = 'jour_gris';
$couleur = "#aaaaaa";
}
if (isset($les_rv[$j])) {
$toile = 'toile_blanche';
$couleur = "black";
$title = textebrut($les_rv[$j]['SUMMARY']);
} }
if (isset($les_rv[$j])) {
$toile = "jour_pris $toile";
$title = textebrut($les_rv[$j]['SUMMARY']);
}
} }
$class= 'calendrier-arial11 calendrier-agenda'; $class= 'calendrier-arial11 calendrier-agenda';
$type = ($semaine ? 'semaine' : 'jour') ; $type = ($semaine ? 'semaine' : 'jour') ;
......
...@@ -70,14 +70,13 @@ function bouton_block_depliable($texte,$deplie,$ids=""){ ...@@ -70,14 +70,13 @@ function bouton_block_depliable($texte,$deplie,$ids=""){
$cible = "#$bouton_id + div.bloc_depliable"; $cible = "#$bouton_id + div.bloc_depliable";
} }
$extra_js = ""; $extra_js = "";
if ($a = extraire_balise($texte,'a')){ if (($deplie!==-1) && ($a = extraire_balise($texte,'a'))){
$ar = inserer_attribut($a,'onclick','return false;',false); $ar = inserer_attribut($a,'onclick','return false;',false);
$texte = str_replace($a,$ar,$texte); $texte = str_replace($a,$ar,$texte);
$extra_js .= "\njQuery('#$bouton_id a').dblclick(function(){window.location.replace($(this).attr('href'));});"; $extra_js .= "\njQuery('#$bouton_id a').dblclick(function(){window.location.replace($(this).attr('href'));});";
} }
if ($deplie==='incertain') if ($deplie==='incertain')
$extra_js .= "\nif (jQuery('$cible').is(':visible')) $('#$bouton_id').addClass('deplie').removeClass('replie');"; $extra_js .= "\nif (jQuery('$cible').is(':visible')) $('#$bouton_id').addClass('deplie').removeClass('replie');";
//$extra_js .= "\njQuery('#$bouton_id').hover(function(){jQuery(this).addClass('hover');},function(){jQuery(this).removeClass('hover');});";
return "<div " return "<div "
.($bouton_id?"id='$bouton_id' ":"") .($bouton_id?"id='$bouton_id' ":"")
......
...@@ -250,26 +250,6 @@ function fin_boite_info($return=false) { ...@@ -250,26 +250,6 @@ function fin_boite_info($return=false) {
if ($return) return $r; else echo $r; if ($return) return $r; else echo $r;
} }
//
// une autre boite
//
// http://doc.spip.org/@bandeau_titre_boite2
function bandeau_titre_boite2($titre, $logo="", $fond="toile_blanche", $texte="ligne_noire") {
global $spip_lang_left, $spip_display, $browser_name;
if (strlen($logo) > 0 AND $spip_display != 1 AND $spip_display != 4) {
$ie_style = ($browser_name == "MSIE") ? "height:1%" : '';
return "\n<div style='position: relative;$ie_style'>"
. "\n<div style='position: absolute; top: -12px; $spip_lang_left: 3px;'>"
. http_img_pack($logo, "", "")
. "</div>"
. "\n<div style='padding: 3px; padding-$spip_lang_left: 30px; border-bottom: 1px solid #444444;' class='verdana2 $fond $texte'>$titre</div>"
. "</div>";
} else {
return "<h3 style='padding: 3px; border-bottom: 1px solid #444444; margin: 0px;' class='verdana2 $fond $texte'>$titre</h3>";
}
}
// //
// La boite des raccourcis // La boite des raccourcis
...@@ -1157,17 +1137,15 @@ function liste_articles_bloques() ...@@ -1157,17 +1137,15 @@ function liste_articles_bloques()
include_spip('inc/drapeau_edition'); include_spip('inc/drapeau_edition');
$articles_ouverts = liste_drapeau_edition ($connect_id_auteur, 'article'); $articles_ouverts = liste_drapeau_edition ($connect_id_auteur, 'article');
if (count($articles_ouverts)) { if (count($articles_ouverts)) {
$res .= "\n<div>&nbsp;</div>" $res .=
. "\n<div class='bandeau_rubriques' style='z-index: 1;'>" debut_cadre('bandeau-rubriques',"article-24.gif",'',_T('info_cours_edition'))
. bandeau_titre_boite2('<b>' . _T('info_cours_edition') . '</b>', "article-24.gif", 'toile_foncee', 'ligne_blanche') . "\n<div class='plan-articles-bloques'>";
. "\n<div class='plan-articles-bloques'>";
foreach ($articles_ouverts as $row) { foreach ($articles_ouverts as $row) {
$ze_article = $row['id_article']; $ze_article = $row['id_article'];
$ze_titre = $row['titre']; $ze_titre = $row['titre'];
$statut = $row["statut"]; $statut = $row["statut"];
$res .= "\n<div class='$statut spip_xx-small'>" $res .= "\n<div class='$statut'>"
. "\n<div style='float:right; '>" . "\n<div style='float:right; '>"
. debloquer_article($ze_article,_T('lien_liberer')) . debloquer_article($ze_article,_T('lien_liberer'))
. "</div>" . "</div>"
...@@ -1178,15 +1156,11 @@ function liste_articles_bloques() ...@@ -1178,15 +1156,11 @@ function liste_articles_bloques()
} }
if (count($articles_ouverts) >= 4) { if (count($articles_ouverts) >= 4) {
$res .= "\n<div class='spip_x-small'>" $res .= "\n<div style='text-align:right; '>"
. "\n<div style='text-align:right; '>"
. debloquer_article('tous', _T('lien_liberer_tous')) . debloquer_article('tous', _T('lien_liberer_tous'))
. "</div>"
. "</div>"; . "</div>";
} }
$res .= fin_cadre('bandeau-rubriques') . "</div>";
$res .= "</div></div>";
} }
} }
return $res; return $res;
...@@ -1328,23 +1302,27 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=NULL, $aj ...@@ -1328,23 +1302,27 @@ function meme_rubrique($id_rubrique, $id, $type, $order='date', $limit=NULL, $aj
} }
$icone = $puce_rubrique . '<b>' . _T('info_meme_rubrique') . '</b>'; $icone = $puce_rubrique . '<b>' . _T('info_meme_rubrique') . '</b>';
$bouton = bouton_block_depliable(_T('info_meme_rubrique'),true,'memerub');
$retour = bandeau_titre_boite2($icone, 'article-24.gif', 'toile_blanche', 'ligne_noire') $retour =
. "\n<table class='spip_x-small' style='background-color: #e0e0e0;border: 0px; padding-left:4px; width: 100%;'>" debut_cadre('meme-rubriques',"article-24.gif",'',$bouton)
. $retour; . debut_block_depliable(true,'memerub')
. "\n<table style='background-color: #e0e0e0;border: 0px; padding-left:4px; width: 100%;'>"
. $retour;
if (_MODE_MEME_RUBRIQUE == 'oui') if (_MODE_MEME_RUBRIQUE == 'oui')
$retour .= (($limit <= 0) ? '' $retour .= (($limit <= 0) ? ''
: "<tr><td colspan='3' style='text-align: center'>+ $limit</td></tr>"); : "<tr><td colspan='3' style='text-align: center'>+ $limit</td></tr>");
$retour .= "</table>"; $retour .= "</table>"
. fin_block()
. fin_cadre('meme-rubriques');
if ($ajax) return $retour; if ($ajax) return $retour;
// id utilise dans puce_statut_article // id utilise dans puce_statut_article
return "\n<div>&nbsp;</div>" return "\n<div>&nbsp;</div>"
. "\n<div id='imgstatut$idom$id_rubrique' class='bandeau_rubriques' style='z-index: 1;'>$retour</div>"; . "\n<div id='imgstatut$idom$id_rubrique'>$retour</div>";
} }
// //
......
...@@ -74,10 +74,9 @@ function inc_referencer_traduction_dist($id_article, $flag, $id_rubrique, $id_tr ...@@ -74,10 +74,9 @@ function inc_referencer_traduction_dist($id_article, $flag, $id_rubrique, $id_tr
. $t . $t
. "</table>\n"; . "</table>\n";
$liste = "\n<div class='liste'>" $liste = debut_cadre('liste','','',_T('trad_article_traduction'))
. bandeau_titre_boite2( '<b>' . _T('trad_article_traduction') . '</b>','', 'toile_blanche', 'ligne_noire')
. $t . $t
. "</div>"; . fin_cadre('liste');
} else $liste = ''; } else $liste = '';
// changer les globales de direction de langue // changer les globales de direction de langue
......
...@@ -358,4 +358,25 @@ function extraire_tag($texte, $tag='a') { ...@@ -358,4 +358,25 @@ function extraire_tag($texte, $tag='a') {
} }
*/ */
?> //
// une autre boite
//
// http://doc.spip.org/@bandeau_titre_boite2
function bandeau_titre_boite2($titre, $logo="", $fond="toile_blanche", $texte="ligne_noire") {
global $spip_lang_left, $spip_display, $browser_name;
if (strlen($logo) > 0 AND $spip_display != 1 AND $spip_display != 4) {
$ie_style = ($browser_name == "MSIE") ? "height:1%" : '';
return "\n<div style='position: relative;$ie_style'>"
. "\n<div style='position: absolute; top: -12px; $spip_lang_left: 3px;'>"
. http_img_pack($logo, "", "")
. "</div>"
. "\n<div style='padding: 3px; padding-$spip_lang_left: 30px; border-bottom: 1px solid #444444;' class='verdana2 $fond $texte'>$titre</div>"
. "</div>";
} else {
return "<h3 style='padding: 3px; border-bottom: 1px solid #444444; margin: 0px;' class='verdana2 $fond $texte'>$titre</h3>";
}
}
?>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter