From e44575d0aebace977c04cfab7e4a695182917b0f Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 6 Jul 2020 12:20:46 +0200 Subject: [PATCH] Message effacement + court et nom de l'article --- module/blog/blog.php | 5 +---- module/blog/view/comment/comment.js.php | 6 +++--- module/blog/view/comment/comment.php | 5 +---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index 704e2103..dbedf0d9 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -35,8 +35,6 @@ class blog extends common { public static $comments = []; - public static $messageComments; - public static $commentsDelete; // Signatures des commentaires déjà saisis @@ -139,7 +137,6 @@ class blog extends common { */ public function comment() { $comments = $this->getData(['module', $this->getUrl(0), $this->getUrl(2),'comment']); - self::$messageComments = '

Commentaires de l\'article '. $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'title']).'

'; self::$commentsDelete = template::button('blogCommentDeleteAll', [ 'class' => 'blogCommentDeleteAll buttonRed', 'href' => helper::baseUrl() . $this->getUrl(0) . '/commentDeleteAll/' . $this->getUrl(2).'/' . $_SESSION['csrf'] , @@ -169,7 +166,7 @@ class blog extends common { } // Valeurs en sortie $this->addOutput([ - 'title' => 'Gestion des commentaires', + 'title' => 'Gestion des commentaires : '. $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'title']), 'view' => 'comment' ]); } diff --git a/module/blog/view/comment/comment.js.php b/module/blog/view/comment/comment.js.php index 200182b3..87fa6da2 100755 --- a/module/blog/view/comment/comment.js.php +++ b/module/blog/view/comment/comment.js.php @@ -17,7 +17,7 @@ $(".blogCommentDelete").on("click", function() { var _this = $(this); var nom = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>"; - return core.confirm("Êtes-vous sûr de vouloir supprimer le commentaire de l'article " + nom + " ?", function() { + return core.confirm("Supprimer le commentaire de l'article " + nom + " ?", function() { $(location).attr("href", _this.attr("href")); }); }); @@ -30,9 +30,9 @@ $(".blogCommentDeleteAll").on("click", function() { var nombre = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'comment' ])); ?>"; var nom = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>"; if( nombre === "1"){ - var message = "Êtes-vous sûr de vouloir supprimer le commentaire de l'article " + nom + " ?"; + var message = "Supprimer le commentaire de l'article " + nom + " ?"; } else{ - var message = "Êtes-vous sûr de vouloir supprimer les " + nombre + " commentaires de l'article " + nom + " ?"; + var message = "Supprimer les " + nombre + " commentaires de l'article " + nom + " ?"; } return core.confirm(message, function() { $(location).attr("href", _this.attr("href")); diff --git a/module/blog/view/comment/comment.php b/module/blog/view/comment/comment.php index d528be80..3d1d4fa5 100755 --- a/module/blog/view/comment/comment.php +++ b/module/blog/view/comment/comment.php @@ -9,10 +9,7 @@ -
- -
-
+