aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/PageTemplates.java1
-rw-r--r--juick-www/src/main/static/scripts.js8
2 files changed, 6 insertions, 3 deletions
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(" <header class=\"u\">");
out.println(" @<a href=\"/" + msg.getUser().getName() + "/\">" + msg.getUser().getName() + "</a>:");
out.println(" <div class=\"msg-avatar\"><a href=\"/" + msg.getUser().getName() + "/\"><img src=\"//i.juick.com/a/" + msg.getUser().getUid() + ".png\" alt=\"" + msg.getUser().getName() + "\"/></a></div>");
+ out.println(" <div class=\"msg-menu\"><a href=\"#\"></a></div>");
out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.getUser().getName() + "/" + msg.getMid() + "\"><time datetime=\"" + sdfSQL.format(msg.getDate()) + "Z\" title=\"" + sdfSQL.format(msg.getDate()) + " GMT\">" + formatDate(msg.TimeAgo, msg.getDate()) + "</time></a></div>");
out.println(" <div class=\"msg-tags\">" + tagsStr + "</div>");
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();
});
});