Skip to content

Node.js based forum software built for the modern web

show no replies in recent and unread

Baris Soner Usakliff50917c2965
diff --git a/public/src/app.js b/public/src/app.js
index ee61e2afc0..bf4a49c315 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -288,6 +288,15 @@ var socket,
}
}
+ app.createUserTooltips = function() {
+ $('img[title].teaser-pic,img[title].user-img').each(function() {
+ $(this).tooltip({
+ placement: 'top',
+ title: $(this).attr('title')
+ });
+ });
+ }
+
app.processPage = function () {
app.populateOnlineUsers();
@@ -296,6 +305,8 @@ var socket,
$('span.timeago').timeago();
$('.post-content img').addClass('img-responsive');
+ app.createUserTooltips();
+
setTimeout(function () {
window.scrollTo(0, 1); // rehide address bar on mobile after page load completes.
}, 100);
diff --git a/public/src/forum/category.js b/public/src/forum/category.js
index 3e9a73eef4..4a7cb8d5e6 100644
--- a/public/src/forum/category.js
+++ b/public/src/forum/category.js
@@ -55,7 +55,7 @@ define(function () {
li.setAttribute('data-pid', posts[i].pid);
- li.innerHTML = '<a href="/user/' + posts[i].userslug + '"><img title="' + posts[i].username + '" style="width: 48px; height: 48px; /*temporary*/" class="img-rounded" src="' + posts[i].picture + '" class="" /></a>' +
+ li.innerHTML = '<a href="/user/' + posts[i].userslug + '"><img title="' + posts[i].username + '" style="width: 48px; height: 48px; /*temporary*/" class="img-rounded user-img" src="' + posts[i].picture + '" class="" /></a>' +
'<a href="/topic/' + posts[i].topicSlug + '#' + posts[i].pid + '">' +
'<strong><span>'+ posts[i].username + '</span></strong>' +
'<p>' +
@@ -68,6 +68,7 @@ define(function () {
recent_replies.appendChild(frag);
}
$('#category_recent_replies span.timeago').timeago();
+ app.createUserTooltips();
});
$(window).off('scroll').on('scroll', function (ev) {
diff --git a/public/templates/category.tpl b/public/templates/category.tpl
index 370f934514..551cdd74b5 100644
--- a/public/templates/category.tpl
+++ b/public/templates/category.tpl
@@ -98,7 +98,7 @@
</div>
<div class="block-content active-users">
<!-- BEGIN active_users -->
- <a data-uid="{active_users.uid}" href="/user/{active_users.userslug}"><img title="{active_users.username}" src="{active_users.picture}" class="img-rounded" /></a>
+ <a data-uid="{active_users.uid}" href="/user/{active_users.userslug}"><img title="{active_users.username}" src="{active_users.picture}" class="img-rounded user-img" /></a>
<!-- END active_users -->
</div>
</div>
diff --git a/public/templates/recent.tpl b/public/templates/recent.tpl
index 0ebb9ea900..ea3d6ca529 100644
--- a/public/templates/recent.tpl
+++ b/public/templates/recent.tpl
@@ -54,6 +54,9 @@
</span>
<span class="pull-right hidden-xs">
+ <!-- IF topics.unreplied -->
+ No one has replied
+ <!-- ELSE -->
<a href="/user/{topics.teaser_userslug}">
<img class="teaser-pic" src="{topics.teaser_userpicture}" title="{topics.teaser_username}"/>
</a>
@@ -61,7 +64,7 @@
replied
</a>
<span class="timeago" title="{topics.teaser_timestamp}"></span>
-
+ <!-- ENDIF topics.unreplied -->
</span>
</small>
</div>
diff --git a/public/templates/unread.tpl b/public/templates/unread.tpl
index 29ac5e454e..fd703c1bed 100644
--- a/public/templates/unread.tpl
+++ b/public/templates/unread.tpl
@@ -49,14 +49,17 @@
</span>
<span class="pull-right hidden-xs">
+ <!-- IF topics.unreplied -->
+ No one has replied
+ <!-- ELSE -->
<a href="/user/{topics.teaser_userslug}">
- <img class="img-rounded teaser-pic" src="{topics.teaser_userpicture}" title="{topics.teaser_username}"/>
+ <img class="teaser-pic" src="{topics.teaser_userpicture}" title="{topics.teaser_username}"/>
</a>
<a href="../../topic/{topics.slug}#{topics.teaser_pid}">
replied
</a>
<span class="timeago" title="{topics.teaser_timestamp}"></span>
-
+ <!-- ENDIF topics.unreplied -->
</span>
</small>
</div>