Forum:Sortarrow

Hi,

When we do a sortable table, there's an image that is added :

http://images.wikia.com/common/releases_200905.3/skins/common/images/sort_none.gif

It doesn't seems there's any way to change it as it is added directly in the HTML, not via CSS. But, maybe using JS (by altering the default sorting function, maybe).

Why do i need this ? Because if we change the background of a sortable table, the image is hardly seen.

Thanks for any advice. — TulipVorlax 12:20, 24 May 2009 (UTC)


 * The only thing i was able to do for now, is altering the background of class="sortarrow" when inside "color1" like on this page. — TulipVorlax 12:23, 24 May 2009 (UTC)


 * It should be possible There are the following variables in wikibits.js:

var ts_image_path = stylepath+"/common/images/"; var ts_image_up = "sort_up.gif"; var ts_image_down = "sort_down.gif"; var ts_image_none = "sort_none.gif";


 * Changing those variables should work --Ciencia Al Poder (talk) -WikiDex 17:27, 24 May 2009 (UTC)


 * That's what I want to configure too. I have one more thing I want to configure. Is it possible to change whether it sorted ascendingly or descendingly first? --MyBrute Resource Center@Ronga 05:08, 25 May 2009 (UTC)


 * I think for this, and what i what to do, it would be better to have the whole js function and be able to redefine it entirely (since it's only while inside color1 that the image need to be changed). — TulipVorlax 09:27, 25 May 2009 (UTC)


 * About first sort direction: no, it isn't possible,and probably not a good idea because it may be unexpected for the user and cause confusion.
 * TulipVorlax: probably you need to redefine the function ts_resortTable, then.
 * I did a custom table scripting with more flexible customization (see ), but only works in Firefox (Opera has issues, and IE is just impossible :S). Now I need to rewrote it using jQuery --Ciencia Al Poder (talk) -WikiDex 19:52, 25 May 2009 (UTC)


 * Ok, i have the js file on my desktop and will look into it someday. I confirm; your thing doesn't work in IE(8). — TulipVorlax 04:52, 27 May 2009 (UTC)