Skip to content

Commit

Permalink
fixing nesting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jessewoo committed Aug 28, 2024
1 parent a317759 commit b63bc98
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions core/components/com_forum/site/assets/js/like.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
console.log("like on site forum");

window.addEventListener('DOMContentLoaded', (domEvent) => {
// Find all the "like" button
const likeButton = document.querySelectorAll('.comment-body .like')
Expand All @@ -17,7 +15,7 @@ window.addEventListener('DOMContentLoaded', (domEvent) => {
const likesList = likeButton[i].dataset.likesList;
const likeCount = likeButton[i].dataset.count;

console.log(threadId, postId, userId, likeCount, userName, likesList);
// console.log(threadId, postId, userId, likeCount, userName, likesList);

const likesListArray = likesList.split("/");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
->set('controller', $this->controller)
->set('comments', $this->comment->get('replies'))
->set('thread', $this->thread)
->set('likes', $this->likes)
->set('parent', $this->comment->get('id'))
->set('config', $this->config)
->set('depth', $this->depth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
->set('controller', $this->controller)
->set('comment', $comment)
->set('like', $likesByPostId)
->set('likes', $this->likes)
->set('thread', $this->thread)
->set('config', $this->config)
->set('depth', $this->depth)
Expand Down
4 changes: 0 additions & 4 deletions core/plugins/groups/forum/assets/js/like.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
console.log("like on GROUP forum");

window.addEventListener('DOMContentLoaded', (domEvent) => {
// Find all the "like" button
const likeButton = document.querySelectorAll('.comment-body .like')
Expand All @@ -17,8 +15,6 @@ window.addEventListener('DOMContentLoaded', (domEvent) => {
const likesList = likeButton[i].dataset.likesList;
const likeCount = likeButton[i].dataset.count;

console.log(threadId, postId, userId, likeCount, userName, likesList);

const likesListArray = likesList.split("/");

if (hasHeart) {
Expand Down
1 change: 1 addition & 0 deletions core/plugins/groups/forum/views/threads/tmpl/_comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
->set('group', $this->group)
->set('comments', $this->comment->get('replies'))
->set('thread', $this->thread)
->set('likes', $this->likes)
->set('parent', $this->comment->get('id'))
->set('config', $this->config)
->set('depth', $this->depth)
Expand Down
1 change: 1 addition & 0 deletions core/plugins/groups/forum/views/threads/tmpl/_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
->set('group', $this->group)
->set('comment', $comment)
->set('like', $likesByPostId)
->set('likes', $this->likes)
->set('thread', $this->thread)
->set('config', $this->config)
->set('depth', $this->depth)
Expand Down

0 comments on commit b63bc98

Please sign in to comment.