diff --git a/public/css/topic.less b/public/css/topic.less index 6a84e61189..60aead6e5f 100644 --- a/public/css/topic.less +++ b/public/css/topic.less @@ -230,24 +230,6 @@ border-radius: 0; } - .main-avatar:hover .hover-overlay { - opacity: 0.75; - } - - .hover-overlay { - margin: 5px; - position: absolute; - bottom: 0px; - height: 35px; - padding-top: 2px; - width: 80px; - font-size: 13px; - line-height: 16px; - background: #000; - opacity: 0; - transition: opacity 0.3s; - } - .post-content { min-height: 80px; } diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index d3449c8fe6..99582fdba4 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -246,9 +246,8 @@ }); $('.post-container').on('click', '.favourite', function() { - var ids = this.id.replace('favs_', '').split('_'), - pid = ids[0], - uid = ids[1]; + var pid = $(this).parents('li').attr('data-pid'); + var uid = $(this).parents('li').attr('data-uid'); var element = $(this).find('i'); if(element.attr('class') == 'icon-star-empty') { @@ -260,9 +259,8 @@ }); $('.post-container').delegate('.edit', 'click', function(e) { - var pid = ($(this).attr('id') || $(this.parentNode).attr('id')).split('_')[1]; - - var main = $(this).parents('.main-post'); + var pid = $(this).parents('li').attr('data-pid'), + main = $(this).parents('.main-post'); require(['composer'], function(cmp) { cmp.push(null, null, pid); @@ -270,10 +268,10 @@ }); $('.post-container').delegate('.delete', 'click', function(e) { - var pid = ($(this).attr('id') || $(this.parentNode).attr('id')).split('_')[1], - postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')), - deleteAction = !postEl.hasClass('deleted') ? true : false, - confirmDel = confirm((deleteAction ? 'Delete' : 'Restore') + ' this post?'); + var pid = $(this).parents('li').attr('data-pid'), + postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')), + deleteAction = !postEl.hasClass('deleted') ? true : false, + confirmDel = confirm((deleteAction ? 'Delete' : 'Restore') + ' this post?'); if (confirmDel) { deleteAction ? diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index a3418a85bb..e761dcce8a 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -12,9 +12,6 @@