NIWA Community Forums

NIWA Community => NIWA Discussion => Topic started by: Greenpickle on November 09, 2010, 07:00:19 PM

Title: table.hideable
Post by: Greenpickle on November 09, 2010, 07:00:19 PM
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 (http://i-know-nothing.co.cc/table.hideable), live example (http://stuff.i-know-nothing.co.cc/wiki/Table.hideable).  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.
Title: Re: table.hideable
Post by: Axiomist on November 10, 2010, 01:22:50 AM
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.
Title: Re: table.hideable
Post by: Greenpickle on November 10, 2010, 08:29:27 AM
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.
Title: Re: table.hideable
Post by: tacopill on April 17, 2011, 06:56:24 PM
Hey greenpickle, is your "live example" down?
Title: Re: table.hideable
Post by: Greenpickle on April 23, 2011, 06:12:32 PM
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.)
Title: Re: table.hideable
Post by: tacopill on April 24, 2011, 10:44:10 PM
Thank you for fixing that.