Please say, is there a way to display glossary terms as tooltip/popup?

Comments

fgm’s picture

Status: Active » Postponed (maintainer needs more info)

Not sure about what your asking there. Could you explain in what context you'd want this type of display ? Or ideally make up an image showing what you mean.

fgm’s picture

Bump. No more details on that request ?

clashar’s picture

Sorry for long delay,

I meant that description for the term as a tooltip (pop-up) would be very good feature.

For example I browse your page http://www.riff.org/articles/produits, and see PHP term that is underscored/linked and it would be good to see the description as tooltip when you mouse hover a term without going to another page http://www.riff.org/g2/entries/PHP.

fgm’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Fixed

Interesting feature, although it has a database cost. I added it in today's dev version, which should be rerolled in the next 12 hours. Thanks for the idea.

clashar’s picture

Merci beaucoup for quick reply! I hope both the terms and descriptions could use Unicode (for French/Cyrillic) characters?

fgm’s picture

This is not a problem indeed. There used to be some problems with URLencoding of fragments for cyrillic, but only on sites without clean URLs, which are no longer supported anyway.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

clashar’s picture

Status: Closed (fixed) » Active

I've checked "Enable tooltips on definitions" in G2 settings page, terms are linked, but my definitions still do not show as tooltip.

How could I check, maybe terms should be wrapped with some div tags or ..?

fgm’s picture

Status: Active » Postponed (maintainer needs more info)

Have you cleared your cache after changing that setting ?

Please post a dump of the HTML being generated for such a link. For <dfn>CSS</dfn>, it should look like <a href="http://drop6/g2/entries/CSS" class="g2-dfn-link" title="Cascading Style Sheets">CSS</a>, assuming a definition for CSS exists in your local glossary.

clashar’s picture

yes, I cleared my cache.

I looked in Firebug for the linked term, it seems that "title" is empty:
école

what could I try to test?

clashar’s picture

sorry didn't put code well:

<a title="" class="g2-dfn-link" href="http://www.paris.kz/emploi/g2/entries/%25C3%25A9cole">école</a>
fgm’s picture

Category: feature » support
Status: Postponed (maintainer needs more info) » Closed (works as designed)

The tooltip is taken from the node teaser, which in G2 is also the "Entry expansion (for acronyms) or translation" on the edit forms, which appears by default as "In other words" on node views.

In your case, you have left that field empty so G2 displays it as you created it: empty.

clashar’s picture

fgm,

thank you, it works now!

one minor bug for me, at the end of the tool-tip line there is <br /> tag, I checked the field "Entry expansion (for acronyms) or translation: " and deleted any unseen characters on the line's end, but this br tag still appears.

any hint?

clashar’s picture

Status: Closed (works as designed) » Active
fgm’s picture

Status: Active » Postponed (maintainer needs more info)

I suppose your configuration for the Filtered HTML input format includes the (default core) LF to BR filter. Since G2 uses teasers, which have a format (unlike titles, which are plain text), it needs to apply the input format for the teaser; so if your content includes a new line after that filter, this will be converted by the core filter to a BR.

I am not able to reproduce the problem on a test site, though.

clashar’s picture

I checked my Filter HTML, there was no BR, then I added. But anyway BR tag appears in tooltip.

I tested to save node in Full HTML format, only then BR tag dissapeared. No matter in which format G2 entry was saved.

So maybe I should just to save node with G2 terms only in Full HTML node.

fgm’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

This is a solution. You can also analyze further which filter causes this: on my test system, even with the end of line converter, these never appear, so it is probably an other filter. At any rate, this does not appear to be a G2 issue.