Skip to content
Extraits de code Groupes Projets
Valider c9c93090 rédigé par Fil's avatar Fil
Parcourir les fichiers

suppression d'une image lors de la creation d'article (#705)

parent 69061eef
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -99,6 +99,9 @@ function inc_legender_dist($id_document, $document, $script, $type, $id, $ancre, ...@@ -99,6 +99,9 @@ function inc_legender_dist($id_document, $document, $script, $type, $id, $ancre,
"' type='submit' />" . "' type='submit' />" .
"</div>\n"; "</div>\n";
$corps = ajax_action_auteur("legender", $id_document, $script, "show_docs=$id_document&id_$type=$id#legender-$id_document", $corps, "&id_document=$id_document&id=$id&type=$type&ancre=$ancre")
. $vignette . "\n\n";
$texte = _T('icone_supprimer_document'); $texte = _T('icone_supprimer_document');
if (preg_match('/_edit$/', $script)) if (preg_match('/_edit$/', $script))
$action = redirige_action_auteur('supprimer', "document-$id_document", $script, "id_$type=$id#$ancre"); $action = redirige_action_auteur('supprimer', "document-$id_document", $script, "id_$type=$id#$ancre");
...@@ -107,10 +110,10 @@ function inc_legender_dist($id_document, $document, $script, $type, $id, $ancre, ...@@ -107,10 +110,10 @@ function inc_legender_dist($id_document, $document, $script, $type, $id, $ancre,
$action = ajax_action_auteur('documenter', "$s$id/$type/$id_document", $script, "id_$type=$id&type=$type&s=$s#$ancre", array($texte)); $action = ajax_action_auteur('documenter', "$s$id/$type/$id_document", $script, "id_$type=$id&type=$type&s=$s#$ancre", array($texte));
} }
$corps = ajax_action_auteur("legender", $id_document, $script, "show_docs=$id_document&id_$type=$id#legender-$id_document", $corps, "&id_document=$id_document&id=$id&type=$type&ancre=$ancre") // le cas $id<0 correspond a un doc charge dans un article pas encore cree,
. $vignette // et ca buggue si on propose de supprimer => on ne propose pas
. "\n\n\n\n" if ($id > 0)
. icone_horizontale($texte, $action, $supp, "supprimer.gif", false); $corps .= icone_horizontale($texte, $action, $supp, "supprimer.gif", false);
$corps = "<div class='verdana1' style='color: " $corps = "<div class='verdana1' style='color: "
. $GLOBALS['couleur_foncee'] . $GLOBALS['couleur_foncee']
...@@ -141,10 +144,13 @@ function vignette_formulaire_legender($id_document, $document, $script, $type, $ ...@@ -141,10 +144,13 @@ function vignette_formulaire_legender($id_document, $document, $script, $type, $
$joindre = charger_fonction('joindre', 'inc'); $joindre = charger_fonction('joindre', 'inc');
$supprimer = icone_horizontale($texte, $action, "vignette-24.png", "supprimer.gif", false);
if ($id<0) $supprimer = ''; // cf. ci-dessus, article pas encore cree
return "<hr style='margin-left: -5px; margin-right: -5px; height: 1px; border: 0px; color: #eeeeee; background-color: white;' />" return "<hr style='margin-left: -5px; margin-right: -5px; height: 1px; border: 0px; color: #eeeeee; background-color: white;' />"
. (!$id_vignette . (!$id_vignette
? $joindre($script, "id_$type=$id",$id, _T('info_vignette_personnalisee'), 'vignette', $type, $ancre, $id_document,$iframe_redirect) ? $joindre($script, "id_$type=$id",$id, _T('info_vignette_personnalisee'), 'vignette', $type, $ancre, $id_document,$iframe_redirect)
: icone_horizontale($texte, $action, "vignette-24.png", "supprimer.gif", false)); : $supprimer);
} }
......
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