• Welcome to NIWA Community Forums.
 

table.hideable

Started by Greenpickle, November 09, 2010, 07:00:19 PM

Previous topic - Next topic

Greenpickle

This is just a script thing I wrote that I thought others might benefit from (though its function is quite specific, not something you'd really want to do very often).  It adds little buttons to specified columns in a table that hide the column.  It works fine with sortable tables, and in most cases with multi-column cells (in particular, cells that span multiple headers aren't attached to a specific one, so they get hidden/shown with either's buttons), but not with multi-row cells.

Information, live example.  It's as simple as putting the code at a CSS page (Mediawiki:Common.css, User:yourname/monobook.css, etc.) and changing the image paths at the top (upload the images somewhere rather than linking to mine - try ImageShack, TinyPic).  Then give the first row in a table column the 'hideable' (and maybe 'hidden') class; here's the example on the information page I linked to in MediaWiki terms:

{| class="wikitable"
! class="hideable" | hideable header
! class="hideable hidden" | hideable header that starts hidden
|-
|cell
[...]
|}


Bug reports and feature requests (not that there's much potential for expansion here) are welcome.

Axiomist

http://forums.warscentral.com/index.php?s=1c30885536b7f2695ca1910eaf94a734&showtopic=3451

Wars Wiki wants this for sure! I'd like to see it on WK too, so if you want to use it there, feel free to, even if it's just your userpage to get it tested in multi browsers, etc.

Greenpickle

Well, I've already tested on Firefox 3.6.13pre, Firefox 4.0b8pre, Chromium 9.0.577.0, Midori 0.2.9 and IE7.  If there's anything I'm wondering about, it's IE6, which I've long since given up caring about.

tacopill

Hey greenpickle, is your "live example" down?







Greenpickle

#4
Oh, yeah, I moved the wiki, and forgot about this link.  The first link (Information) still links to the example correctly, and I'll fix the second link anyway.

Edit: oh, right, I see what you mean.  Fixed.  (It was the same problem, actually - links pointing to the wrong place.)

tacopill

Thank you for fixing that.