aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src')
-rw-r--r--juick-www/src/main/static/scripts.js2
-rw-r--r--juick-www/src/main/webapp/WEB-INF/views/thread.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index c9be85dd..39d57118 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -717,7 +717,7 @@ ready(function () {
e.preventDefault();
});
});
- document.querySelectorAll('.ir a[data-fname]').forEach(function (el) {
+ document.querySelectorAll('.ir a[data-fname], .msg-media a[data-fname]').forEach(function (el) {
el.addEventListener('click', function (e) {
let fname = e.target.closest('[data-fname]').getAttribute('data-fname');
if (!showPhotoDialog(fname)) {
diff --git a/juick-www/src/main/webapp/WEB-INF/views/thread.html b/juick-www/src/main/webapp/WEB-INF/views/thread.html
index c317a2f2..247b3224 100644
--- a/juick-www/src/main/webapp/WEB-INF/views/thread.html
+++ b/juick-www/src/main/webapp/WEB-INF/views/thread.html
@@ -24,7 +24,7 @@
<div class="msg-txt">{{ msg | formatMessage }}</div>
{% if msg.AttachmentType is not empty %}
<div class="msg-media">
- <a href="//i.juick.com/p/{{ msg.mid }}.{{ msg.AttachmentType }}">
+ <a href="//i.juick.com/p/{{ msg.mid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}.{{ msg.AttachmentType }}">
<img src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/>
</a>
</div>