From d690331c7a7e9e953a1b40dd2b9522f47e2ee16c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 19 Jan 2023 11:38:23 +0100 Subject: [PATCH] Blog 6.4 Dialogues JS files --- module/blog/i18n/fr_FR.json | 7 ++++++- module/blog/view/comment/comment.js.php | 18 ++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/module/blog/i18n/fr_FR.json b/module/blog/i18n/fr_FR.json index 8aff9cb6..70dcb0db 100644 --- a/module/blog/i18n/fr_FR.json +++ b/module/blog/i18n/fr_FR.json @@ -58,5 +58,10 @@ "Éditer l'article": "", "Effacer l'article": "", "État": "", - "Masquer l'image de couverture dans l'article": "" + "Masquer l'image de couverture dans l'article": "", + "Supprimer le commentaire ?": "", + "Approuver le commentaire ?": "", + "Rejeter le commentaire ?": "", + "Supprimer tous les commentaire ?": "", + "Êtes-vous sûr de vouloir supprimer cet article ?": "" } \ No newline at end of file diff --git a/module/blog/view/comment/comment.js.php b/module/blog/view/comment/comment.js.php index fbdf0c02..9659d911 100755 --- a/module/blog/view/comment/comment.js.php +++ b/module/blog/view/comment/comment.js.php @@ -17,8 +17,8 @@ */ $(".blogCommentDelete").on("click", function() { var _this = $(this); - var nom = "getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title' ]); ?>"; - return core.confirm("Supprimer le commentaire de l'article " + nom + " ?", function() { + var message = ""; + return core.confirm(message , function() { $(location).attr("href", _this.attr("href")); }); }); @@ -28,8 +28,8 @@ $(".blogCommentDelete").on("click", function() { */ $(".blogCommentApproved").on("click", function() { var _this = $(this); - var nom = "getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title' ]); ?>"; - return core.confirm("Approuver le commentaire de l'article " + nom + " ?", function() { + var message = ""; + return core.confirm(message , function() { $(location).attr("href", _this.attr("href")); }); }); @@ -39,8 +39,8 @@ $(".blogCommentApproved").on("click", function() { */ $(".blogCommentRejected").on("click", function() { var _this = $(this); - var nom = "getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title' ]); ?>"; - return core.confirm("Rejeter le commentaire de l'article " + nom + " ?", function() { + var message = ""; + return core.confirm(message , function() { $(location).attr("href", _this.attr("href")); }); }); @@ -50,12 +50,10 @@ $(".blogCommentRejected").on("click", function() { */ $(".blogCommentDeleteAll").on("click", function() { var _this = $(this); - 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 + " ?"; + var message = ""; } else { - var message = "Supprimer les " + nombre + " commentaires de l'article " + nom + " ?"; + var message = ""; } return core.confirm(message, function() { $(location).attr("href", _this.attr("href"));