From 7c6fe8c4e2a5b3d26973711a915025ac3a09a924 Mon Sep 17 00:00:00 2001 From: Abijeet Date: Mon, 5 Jun 2017 00:20:37 +0530 Subject: [PATCH] #47 - Changes the location of the reply and edit comment box. --- app/Repos/CommentRepo.php | 4 ++-- resources/assets/js/controllers.js | 2 +- resources/assets/js/directives.js | 2 +- resources/lang/en/activities.php | 1 - resources/lang/en/entities.php | 3 ++- resources/views/comments/list-item.blade.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Repos/CommentRepo.php b/app/Repos/CommentRepo.php index b8aa579c6..ce71b9234 100644 --- a/app/Repos/CommentRepo.php +++ b/app/Repos/CommentRepo.php @@ -46,8 +46,8 @@ class CommentRepo { } public function delete($comment) { - $comment->text = trans('activities.comment_deleted'); - $comment->html = trans('activities.comment_deleted'); + $comment->text = trans('entities.comment_deleted'); + $comment->html = trans('entities.comment_deleted'); $comment->active = false; $userId = user()->id; $comment->updated_by = $userId; diff --git a/resources/assets/js/controllers.js b/resources/assets/js/controllers.js index 51f018232..67e77a542 100644 --- a/resources/assets/js/controllers.js +++ b/resources/assets/js/controllers.js @@ -848,7 +848,7 @@ module.exports = function (ngApp, events) { comment.updated_by = resp.comment.updated_by; comment.active = resp.comment.active; if (isDelete && !resp.comment.active) { - comment.html = trans('activities.comment_deleted'); + comment.html = trans('entities.comment_deleted'); } else { comment.html = resp.comment.html; } diff --git a/resources/assets/js/directives.js b/resources/assets/js/directives.js index 5bd764fa7..3577cf396 100644 --- a/resources/assets/js/directives.js +++ b/resources/assets/js/directives.js @@ -890,7 +890,7 @@ module.exports = function (ngApp, events) { }); element.on('click', function () { - var $container = element.parents('.comment-box').first(); + var $container = element.parents('.comment-actions').first(); if (!$container.length) { console.error('commentReplyLink directive should be placed inside a container with class comment-box!'); return; diff --git a/resources/lang/en/activities.php b/resources/lang/en/activities.php index 125326b33..094f97306 100644 --- a/resources/lang/en/activities.php +++ b/resources/lang/en/activities.php @@ -41,6 +41,5 @@ return [ 'comment_create_notification' => '', 'comment_update_notification' => '', 'comment_delete_notification' => '', - 'comment_deleted' => 'This comment has been deleted.' ]; diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.php index dd7c54755..c0439f0e1 100644 --- a/resources/lang/en/entities.php +++ b/resources/lang/en/entities.php @@ -246,5 +246,6 @@ return [ 'one_comment' => '1 Comment', 'comments_loading' => 'Loading...', 'comment_save' => 'Save Comment', - 'comment_cancel' => 'Cancel' + 'comment_cancel' => 'Cancel', + 'comment_deleted' => 'This comment has been deleted.' ]; \ No newline at end of file diff --git a/resources/views/comments/list-item.blade.php b/resources/views/comments/list-item.blade.php index 12629f0d6..ec0b13f17 100644 --- a/resources/views/comments/list-item.blade.php +++ b/resources/views/comments/list-item.blade.php @@ -10,7 +10,7 @@
- {{ trans('activities.comment_deleted') }} + {{ trans('entities.comment_deleted') }}