From ff50917c2965e244e9c7167eff20c42d36280341 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Sun, 24 Nov 2013 22:48:58 -0500 Subject: [PATCH] show no replies in recent and unread --- public/src/app.js | 11 +++++++++++ public/src/forum/category.js | 3 ++- public/templates/category.tpl | 2 +- public/templates/recent.tpl | 5 ++++- public/templates/unread.tpl | 7 +++++-- 5 files changed, 23 insertions(+), 5 deletions(-) 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 = '' + + li.innerHTML = '' + '' + ''+ posts[i].username + '' + '

' + @@ -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 @@

- +
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 @@ 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 @@