Persona - teaser avatar not showing tooltip with name.
-
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
nodebb-theme-persona/templates/partials/topics_list.tpl at master ยท NodeBB/nodebb-theme-persona
Persona - A modern and responsive NodeBB theme. Contribute to NodeBB/nodebb-theme-persona development by creating an account on GitHub.
GitHub (github.com)