From 54426593d550e4c740a4cdda7d13f3468f5b5995 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 26 Apr 2021 22:03:49 +0200 Subject: [PATCH] Blog 5.1 bug bouton effacement des commentaires --- module/blog/blog.php | 2 +- module/blog/view/comment/comment.js.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index e9959dfb..43627c37 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -15,7 +15,7 @@ class blog extends common { - const VERSION = '5.0'; + const VERSION = '5.1'; const REALNAME = 'Blog'; const DELETE = true; const UPDATE = '0.0'; diff --git a/module/blog/view/comment/comment.js.php b/module/blog/view/comment/comment.js.php index fa9fe18d..636d55e5 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' ]); ?>"; + var nom = "getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title' ]); ?>"; return core.confirm("Supprimer le commentaire de l'article " + nom + " ?", function() { $(location).attr("href", _this.attr("href")); }); @@ -28,7 +28,7 @@ $(".blogCommentDelete").on("click", function() { */ $(".blogCommentApproved").on("click", function() { var _this = $(this); - var nom = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>"; + var nom = "getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title' ]); ?>"; return core.confirm("Approuver le commentaire de l'article " + nom + " ?", function() { $(location).attr("href", _this.attr("href")); }); @@ -39,7 +39,7 @@ $(".blogCommentApproved").on("click", function() { */ $(".blogCommentRejected").on("click", function() { var _this = $(this); - var nom = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>"; + var nom = "getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title' ]); ?>"; return core.confirm("Rejeter le commentaire de l'article " + nom + " ?", function() { $(location).attr("href", _this.attr("href")); }); @@ -50,11 +50,11 @@ $(".blogCommentRejected").on("click", function() { */ $(".blogCommentDeleteAll").on("click", function() { var _this = $(this); - var nombre = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'comment' ])); ?>"; + var nombre = "getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'comment' ])); ?>"; var nom = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>"; if( nombre === "1"){ var message = "Supprimer le commentaire de l'article " + nom + " ?"; - } else{ + } else { var message = "Supprimer les " + nombre + " commentaires de l'article " + nom + " ?"; } return core.confirm(message, function() {