Persona - teaser avatar not showing tooltip with name.
-
I am using the persona theme and realized that the avatar (in the teaser column) wont show the users name in the tooltip if the user has uploaded a picture.. If the users avatar is the default one (color with letter) then it shows the usersname on hover.
Thanks,
-
https://github.com/NodeBB/nodebb-theme-lavender/issues/60 already fixed. will work when you update just like you assumed
@Kowlin I think you misunderstood the issue, it's just about the bootstrap popover. -
@frissdiegurke that's what I get for posting when I just woke up
-
@frissdiegurke I think i should start searching github issues prior to posting from now on.
-
I changed the createusertooltips code to:
app.createUserTooltips = function(els) { els = els || $('body'); els.find('.avatar,img[title].teaser-pic,img[title].user-img,div.user-icon,span.user-icon').each(function() { if (!utils.isTouchDevice()) { $(this).tooltip({ placement: 'top', title: $(this).attr('title') }); } }); };
..but it still doesn't work.
The element looks like this in Chrome:
<img class="user-img" alt="myusername" src="/uploads/profile/8-profileimg.jpg">
Shouldnt the title have been injected?
Thanks
-
@whitts no... the title doesn't get injected. the code just takes the value of the title attribute from the <img> tag and displays it as a tool tip. you need to add the title attribute to the <img> tag with a value.
like this line
https://github.com/NodeBB/nodebb-theme-persona/blob/master/templates/partials/topics_list.tpl#L86