Resizing the glossaries popup box size

Re: Resizing the glossaries popup box size

by Joseph Rézeau -
Number of replies: 7
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I don't think what Ji wants to achieve is possible without resorting to a Javascript script plus some hacking of the Moodle core files.

Anyway, I have tried your .autolink:hover CSS hack, and it does not work in Firefox 2 nor in MS Internet Explorer 7. The result is to display a "vibrating" box which is not much use.

Have you actually tried it? in which browsers? Can you post a screen shot showing the result? I am sceptical, as I think you can not change the look of the title attribute a CSS-only method.mixed

Joseph

In reply to Joseph Rézeau

Re: Resizing the glossaries popup box size

by Oswald Zangerle -
Hi Joseph,

I have tried it - and it worked for me - in testing it again I sometimes get the vibrating sometimes not. Amazingly by putting the mouse in the vibrating box it becomes static. Just the same, it is of no use this way.
It is different though when I change some parameters:
.autolink:hover {
display : block;
text-decoration : none;
position : absolute;
left:10px;
right:10px;
top:50px;
bottom:10px;
width : 627px;
height: 200px;
padding :5px;
color : black;
background : #faffff;
border : 1px inset #257;
}
this stays static for me in FF2 and IE 7.
If I change width or height to much it´s vibrating again...
Some time ago I used it on http://fp.tsn.at/hs-abschluss/danke.htm
(You can see it on mouse over at the bottom "Home")

as for "a Javascript script plus some hacking of the Moodle core files" as far as I can remember Moodle uses some overLIB scripts; maybe it would be possible to adapt them - I almost know nothing about Java scripts though.

Oswald
In reply to Oswald Zangerle

Re: Resizing the glossaries popup box size

by Ji Ming -

Hello Oswald,

Thanks for your help. I've followed your instructions and it looks like it doesn't work. We used different browsers and it doesn't change the size of the box. You see I we want to chang the size of the box hovering over the word highlighted (example: glossary ).

Do you think that the ode which controls the size is in a java code somewhere? This should be a straight forward control, right?

Ji

In reply to Ji Ming

Re: Resizing the glossaries popup box size

by Oswald Zangerle -
Hello Ji,

"Do you think that the code which controls the size is in a java code somewhere?" I don´t think so. The width is automatically adapted to the content of the tooltip. With JavaScript, DHTML Tooltips you can change this.
According to W3C specifications the values of the title attribute may be rendered by user agents in a variety of ways.
In the desktop properties you can change the appearance of the system tooltips.
In my example I change the tooltip/ title appearance with CSS.
How did you integrate my (second) example into your CSS?

I hope you can get help from people with more knowledge about Java Scripts if my CSS example doesn't function properly.

Oswald




In reply to Oswald Zangerle

Re: Resizing the glossaries popup box size

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Sorry Oswald, it does not work in Moodle. The example you give on http://fp.tsn.at/hs-abschluss/danke.htm is not a Moodle site. In that example, some extra text is added within a <span> tag. Have you actually tried your CSS example by adding those CSS Lines to the end of a CSS file in a moodle theme?

Thanks for the idea of using the overLib scripts. I will explore that.

What I have been able to achieve so far involves both hacking one moodle file (mod/glossary/filter.php) and adding CSS rules in a moodle theme. It is not satisfactory, as the "box" can only be displayed in a fixed position away from the autolinked word, but it's a way forward (seen attached screenshot (2), actually taken from a Moodle site).

Ji, it might help us find a solution if you told us exactly why you need this resizing of the tooltip balloon (1a). Do you in fact want the text inside that box to appear in larger font? (1b) If not, I really don't understand why you would want the tooltip balloon to be larger.

Finally, Ji and Oswald, this has nothing to do with Java. It might be achieved with Javascript (a different language).

Joseph

Attachment image00.jpg
In reply to Joseph Rézeau

Re: Resizing the glossaries popup box size

by Oswald Zangerle -
Hello Joseph,
"Have you actually tried your CSS example by adding those CSS Lines to the end of a CSS file in a Moodle theme?"
No. I created one .htm example just for to try it outside of Moodle. I am sure if it would work there accordingly we would be able to put it on a Moodle CSS theme. It is not the case so far.
"In that example, some extra text is added within a <span> tag."
Yes, but it doesn´t matter if it is applied to a span tag or if it´s applied to a already existing class for the title attribute.
The problem with Javascript as I understand it will be to apply it to all glossary entries giving/ calling the function by id (get element by id) but as I mentioned before Javascript is not a language I am comfortable with.
I don´t understand the need of this resizing otherwise I could give it some more thoughts/ try and error testing.

Oswald



In reply to Joseph Rézeau

Re: Resizing the glossaries popup box size

by Ji Ming -

Hi Joseph and Oswald,

Thank you for your help. We need to enlarge the tooltip balloon because we work with Asian langauges in our glossary. Our glossaries are in Japanese, Korean and Chinese. When we have text in one of these langauges we would like the balloon to display the information from our glossaries larger so the "characters" can be seen clearly. As they look now, they display just way too small to see clearly. Asian language characters are written in "strokes" that need to be seen clearly as one stroke more or less can have another completely different meaning.

By making the toolbox larger the characters could be seen clearly without confusion.

Ji

In reply to Joseph Rézeau

Re: Resizing the glossaries popup box size

by Ji Ming -

Should there be a code somewhere in the glossary files that contro the size of the font like in most apps? In our situation the font is just too small.

Does anyone know how to enlarge the glossary fonts?

Ji