You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by danyboy85 <dg...@sopragroup.com> on 2011/12/27 11:25:35 UTC

How to override the sort image tooltip of a grid ?

Hello,

First I'm french so, sorry for my bad level in english...
In IE7, if you move the mouth over the sort image of a tapestry grid, you
see the tooltip : "[Sortable]" :

http://imageshack.us/f/233/sorty.jpg/

It is a bug in IE7 : it shows the "alt" property of "img" tag into a
tooltip, like the "title" property.
The text of "alt" property is defined in tapestry core, in the file
"GridColumns.properties" :

sortable=[Sortable]

(View also GridColumns.tml, GridColumns.class)

I would override this message. To do this I tried to override the sortable
message in a .properties file which is associated to my .tml file
(sortable=MyMessage) but it doesn't work.

Have you an idea ?

Thanks ;) 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-override-the-sort-image-tooltip-of-a-grid-tp5102886p5102886.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to override the sort image tooltip of a grid ?

Posted by danyboy85 <dg...@sopragroup.com>.
I did receive a mail of this forum because of a response by Indrek Tomm, but
it seams he has deleted its post.

I share it because his solution is the very best !!!! :


Indrek Toom wrote
> 
> Had the same problem with Tapestry 5.1. Thought that this works out of the
> box since in GridColumns the alt value is localized:
> 
> public String getIconLabel()
> {
> switch (getSortForColumn())
> { case ASCENDING: return messages.get("ascending"); case DESCENDING: 
> return messages.get("descending"); default: return
> messages.get("sortable"); }
> 
> }
> 
> And for example in GridColumns_fi_FI.properties there is:
> 
> ascending=[Nouseva]
> descending=[Laskeva]
> sortable=[J\u00E4rjestett\u00E4v\u00E4]
> 
> 
> Fixed by adding my own GridColumns_fi.properties file to my project's
> /src/main/resources/org/apache/tapestry5/corelib/components/GridColumns_fi.properties
> 
> 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-override-the-sort-image-tooltip-of-a-grid-tp5102886p5105368.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to override the sort image tooltip of a grid ?

Posted by danyboy85 <dg...@sopragroup.com>.
I did'nt use jQuery but prototype :

var imgs = $$('.t-sort-icon');
imgs.each(function(img) {
	img.alt = 'Trier les résultats';
});

and it works ;)

But i really think a better solution should be that Tapestry framework let
users configure there own "alt" value, like users can override label values
into a properties file.

Anyway, thanks for your precious help ;)

Bye

--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-override-the-sort-image-tooltip-of-a-grid-tp5102886p5105267.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to override the sort image tooltip of a grid ?

Posted by Dusko Jovanovski <du...@gmail.com>.
This is really an IE issue. In order to get IE to behave correctly, use an
empty title attribute (title="").

Here's a small jQuery snippet that solves your problem (not tested, i don't
have access to IE7)

jQuery('.t-sort-icon').attr('title', '');

On Wed, Dec 28, 2011 at 9:38 AM, danyboy85 <dg...@sopragroup.com>wrote:

> Anyone knows how to resolve this problem ?
>
> Maybe because nobody is using Internet Explorer 7 .
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/How-to-override-the-sort-image-tooltip-of-a-grid-tp5102886p5104840.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: How to override the sort image tooltip of a grid ?

Posted by danyboy85 <dg...@sopragroup.com>.
Anyone knows how to resolve this problem ?

Maybe because nobody is using Internet Explorer 7 .

--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-override-the-sort-image-tooltip-of-a-grid-tp5102886p5104840.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org