#47 - Changes the location of the reply and edit comment box.

This commit is contained in:
Abijeet 2017-06-05 00:20:37 +05:30
parent 689d1eb082
commit 7c6fe8c4e2
6 changed files with 7 additions and 7 deletions

View File

@ -46,8 +46,8 @@ class CommentRepo {
} }
public function delete($comment) { public function delete($comment) {
$comment->text = trans('activities.comment_deleted'); $comment->text = trans('entities.comment_deleted');
$comment->html = trans('activities.comment_deleted'); $comment->html = trans('entities.comment_deleted');
$comment->active = false; $comment->active = false;
$userId = user()->id; $userId = user()->id;
$comment->updated_by = $userId; $comment->updated_by = $userId;

View File

@ -848,7 +848,7 @@ module.exports = function (ngApp, events) {
comment.updated_by = resp.comment.updated_by; comment.updated_by = resp.comment.updated_by;
comment.active = resp.comment.active; comment.active = resp.comment.active;
if (isDelete && !resp.comment.active) { if (isDelete && !resp.comment.active) {
comment.html = trans('activities.comment_deleted'); comment.html = trans('entities.comment_deleted');
} else { } else {
comment.html = resp.comment.html; comment.html = resp.comment.html;
} }

View File

@ -890,7 +890,7 @@ module.exports = function (ngApp, events) {
}); });
element.on('click', function () { element.on('click', function () {
var $container = element.parents('.comment-box').first(); var $container = element.parents('.comment-actions').first();
if (!$container.length) { if (!$container.length) {
console.error('commentReplyLink directive should be placed inside a container with class comment-box!'); console.error('commentReplyLink directive should be placed inside a container with class comment-box!');
return; return;

View File

@ -41,6 +41,5 @@ return [
'comment_create_notification' => '', 'comment_create_notification' => '',
'comment_update_notification' => '', 'comment_update_notification' => '',
'comment_delete_notification' => '', 'comment_delete_notification' => '',
'comment_deleted' => 'This comment has been deleted.'
]; ];

View File

@ -246,5 +246,6 @@ return [
'one_comment' => '1 Comment', 'one_comment' => '1 Comment',
'comments_loading' => 'Loading...', 'comments_loading' => 'Loading...',
'comment_save' => 'Save Comment', 'comment_save' => 'Save Comment',
'comment_cancel' => 'Cancel' 'comment_cancel' => 'Cancel',
'comment_deleted' => 'This comment has been deleted.'
]; ];

View File

@ -10,7 +10,7 @@
</div> </div>
<div ng-if="::!comment.active" class="comment-body comment-inactive"> <div ng-if="::!comment.active" class="comment-body comment-inactive">
{{ trans('activities.comment_deleted') }} {{ trans('entities.comment_deleted') }}
</div> </div>
<div class="comment-actions"> <div class="comment-actions">
<ul ng-if="!comment.is_hidden"> <ul ng-if="!comment.is_hidden">