Skip to content

Commit

Permalink
don't show popup when count is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jessewoo committed Aug 27, 2024
1 parent 9d7ebd9 commit a317759
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/components/com_forum/site/assets/js/like.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ window.addEventListener('DOMContentLoaded', (domEvent) => {

// Hover over and mouse leave
likeButton[i].onmouseover = (e) => {
likeButton[i].getElementsByClassName('elementToPopup')[0].style.display = 'block';
if (likeButton[i].dataset.count > 0) {
likeButton[i].getElementsByClassName('elementToPopup')[0].style.display = 'block';
}
};

likeButton[i].onmouseleave = (e) => {
Expand Down
4 changes: 3 additions & 1 deletion core/plugins/groups/forum/assets/js/like.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ window.addEventListener('DOMContentLoaded', (domEvent) => {

// Hover over and mouse leave
likeButton[i].onmouseover = (e) => {
likeButton[i].getElementsByClassName('elementToPopup')[0].style.display = 'block';
if (likeButton[i].dataset.count > 0) {
likeButton[i].getElementsByClassName('elementToPopup')[0].style.display = 'block';
}
};

likeButton[i].onmouseleave = (e) => {
Expand Down

0 comments on commit a317759

Please sign in to comment.