From 5ea5b5737138e3ee4eee4c87a970d401276b53b2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 24 Mar 2017 14:15:11 +0300 Subject: msg-menu in message lists --- .../src/main/java/com/juick/www/controllers/PageTemplates.java | 1 + juick-www/src/main/static/scripts.js | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'juick-www') diff --git a/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java b/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java index 6ee18732..c8e31729 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java +++ b/juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java @@ -334,6 +334,7 @@ public class PageTemplates { out.println("
"); out.println(" @" + msg.getUser().getName() + ":"); out.println("
\""
"); + out.println("
"); out.println("
"); out.println("
" + tagsStr + "
"); diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js index 2fb23130..9cb19fe5 100644 --- a/juick-www/src/main/static/scripts.js +++ b/juick-www/src/main/static/scripts.js @@ -616,9 +616,11 @@ ready(function () { document.querySelectorAll('.msg-menu a').forEach(function (el) { el.addEventListener('click', function (e) { - showMessageLinksDialog( - e.target.closest('section').getAttribute('data-mid'), - parseInt(e.target.closest('li').id)); // rid + var reply = e.target.closest('li'); + var rid = reply ? parseInt(reply.id) : 0; + var message = e.target.closest('section'); + var mid = message.getAttribute('data-mid') || e.target.closest('article').getAttribute('data-mid'); + showMessageLinksDialog(mid, rid); e.preventDefault(); }); }); -- cgit v1.2.3