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

Suite de [7523]: encore un cache du DOM à neutraliser pour cause d'Ajax. On en...

Suite de [7523]: encore un cache du DOM à neutraliser pour cause d'Ajax. On en profite pour continuer à rationnaliser le nommage des fichiers.
parent 10b35d40
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -440,6 +440,7 @@ ecrire/inc/iconifier.php -text
ecrire/inc/import_0_0.php -text
ecrire/inc/import_1_2.php -text
ecrire/inc/import_1_3.php -text
ecrire/inc/informer.php -text
ecrire/inc/install_.php -text
ecrire/inc/install_0.php -text
ecrire/inc/install_1.php -text
......
......@@ -13,7 +13,6 @@
if (!defined("_ECRIRE_INC_VERSION")) return;
include_spip('inc/presentation');
include_spip('inc/auteur_voir');
include_spip('inc/message_select');
// http://doc.spip.org/@exec_auteurs_edit_dist
......
......@@ -12,70 +12,18 @@
if (!defined("_ECRIRE_INC_VERSION")) return;
# Affiche les infos d'une rubrique selectionnee dans le mini navigateur
# Les informations d'une rubrique selectionnee dans le mini navigateur
// http://doc.spip.org/@fragments_informer_dist
function fragments_informer_dist()
{
global $couleur_foncee,$spip_display,$spip_lang_right ;
global $id, $exclus, $col, $type, $rac;
$id = intval($id);
$exclus = intval($exclus);
$col = intval($col);
$corps ='';
include_spip('inc/texte');
if ($type == "rubrique") {
$res = spip_query("SELECT titre, descriptif FROM spip_rubriques WHERE id_rubrique = $id");
if ($row = spip_fetch_array($res)) {
$titre = typo($row["titre"]);
$descriptif = propre($row["descriptif"]);
} else {
$titre = _T('info_racine_site');
}
} else
$titre = '';
$rac = htmlentities($rac);
$corps .= "<div style='display: none;'>";
$corps .= "<input type='text' id='".$rac."_sel' value='$id' />";
$corps .= "<input type='text' id='".$rac."_sel2' value=\"".entites_html($titre)."\" />";
$corps .= "</div>";
$id = intval(_request('id'));
$col = intval(_request('col'));
$exclus = intval(_request('exclus'));
$corps .= "<div class='arial2' style='padding: 5px; background-color: white; border: 1px solid $couleur_foncee; border-top: 0px;'>";
if ($type == "rubrique" AND $spip_display != 1 AND $spip_display!=4 AND $GLOBALS['meta']['image_process'] != "non") {
$logo_f = charger_fonction('chercher_logo', 'inc');
if ($res = $logo_f($id, 'id_rubrique', 'on')) {
list($fid, $dir, $nom, $format) = $res;
$res = ratio_image($fid, $nom, $format, 100, 48, "alt=''");
if ($res)
$corps .= "<div style='float: $spip_lang_right; margin-$spip_lang_right: -5px; margin-top: -5px;'>$res</div>";
}
}
$corps .= "<div><p><b>$titre</b></p></div>";
if (strlen($descriptif) > 0) $corps .= "<div>$descriptif</div>";
$corps .= "<div style='text-align: $spip_lang_right;'>";
# ce lien provoque la selection (directe) de la rubrique cliquee
$onClick = "findObj('id_parent').value=$id;";
# et l'affichage de son titre dans le bandeau
$onClick .= "findObj('titreparent').value='"
. strtr(
str_replace("'", "&#8217;",
str_replace('"', "&#34;",
textebrut($titre))),
"\n\r", " ")."';";
$onClick .= "findObj('selection_rubrique').style.display='none';";
$onClick .= "return false;";
$corps .= "<input type='submit' value='"._T('bouton_choisir')."' onClick=\"$onClick\" class=\"fondo\" />";
$corps .= "</div>";
$corps .= "</div>";
return $corps;
$f = charger_fonction('informer', 'inc');
return $f($id, $col, $exclus, _request('rac'), _request('type'));
}
?>
<?php
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
* Copyright (c) 2001-2006 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
\***************************************************************************/
if (!defined("_ECRIRE_INC_VERSION")) return;
# Les information d'une rubrique selectionnee dans le mini navigateur
function inc_informer_dist($id, $col, $exclus, $rac, $type)
{
global $couleur_foncee,$spip_display,$spip_lang_right ;
include_spip('inc/texte');
if ($type == "rubrique") {
$res = spip_query("SELECT titre, descriptif FROM spip_rubriques WHERE id_rubrique = $id");
if ($row = spip_fetch_array($res)) {
$titre = typo($row["titre"]);
$descriptif = propre($row["descriptif"]);
} else {
$titre = _T('info_racine_site');
}
} else
$titre = '';
$res = '';
if ($type == "rubrique" AND $spip_display != 1 AND $spip_display!=4 AND $GLOBALS['meta']['image_process'] != "non") {
$logo_f = charger_fonction('chercher_logo', 'inc');
if ($res = $logo_f($id, 'id_rubrique', 'on')) {
list($fid, $dir, $nom, $format) = $res;
$res = ratio_image($fid, $nom, $format, 100, 48, "alt=''");
if ($res)
$res = "<div style='float: $spip_lang_right; margin-$spip_lang_right: -5px; margin-top: -5px;'>$res</div>";
}
}
$rac = htmlentities($rac);
spip_log("info $res");
# ce lien provoque la selection (directe) de la rubrique cliquee
$onClick = "findObj_forcer('id_parent').value=$id;";
# et l'affichage de son titre dans le bandeau
$onClick .= "findObj_forcer('titreparent').value='"
. strtr(
str_replace("'", "&#8217;",
str_replace('"', "&#34;",
textebrut($titre))),
"\n\r", " ")."';";
$onClick .= "findObj_forcer('selection_rubrique').style.display='none';";
$onClick .= "return false;";
return "<div style='display: none;'>"
. "<input type='text' id='".$rac."_sel' value='$id' />"
. "<input type='text' id='".$rac."_sel2' value=\""
. entites_html($titre)
. "\" />"
. "</div>"
. "<div class='arial2' style='padding: 5px; background-color: white; border: 1px solid $couleur_foncee; border-top: 0px;'>"
. (!$res ? '' : $res)
. "<div><p><b>$titre</b></p></div>"
. (!$descriptif ? '' : "<div>$descriptif</div>")
. "<div style='text-align: $spip_lang_right;'>"
. "<input type='submit' value='"
. _T('bouton_choisir')
. "' onClick=\"$onClick\" class=\"fondo\" />"
. "</div>"
. "</div>";
}
?>
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