Author Topic: table.hideable  (Read 8231 times)

Offline Greenpickle

  • Forum Administrator
  • *****
  • Posts: 470
  • Gender: Male
    • View Profile
    • My site
table.hideable
« 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, 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:

Code: [Select]
{| 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.
« Last Edit: November 29, 2011, 11:03:12 PM by Greenpickle »

Offline Axiomist

  • Retired Staff
  • *
  • Posts: 618
  • Gender: Male
    • View Profile
    • WiKirby
Re: table.hideable
« Reply #1 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.

Offline Greenpickle

  • Forum Administrator
  • *****
  • Posts: 470
  • Gender: Male
    • View Profile
    • My site
Re: table.hideable
« Reply #2 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.

Offline tacopill

  • Lylat Wiki Staff
  • ***
  • Posts: 3128
    • View Profile
    • csanimefan
Re: table.hideable
« Reply #3 on: April 17, 2011, 06:56:24 PM »
Hey greenpickle, is your "live example" down?







Offline Greenpickle

  • Forum Administrator
  • *****
  • Posts: 470
  • Gender: Male
    • View Profile
    • My site
Re: table.hideable
« Reply #4 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.)
« Last Edit: April 23, 2011, 06:22:46 PM by Greenpickle »

Offline tacopill

  • Lylat Wiki Staff
  • ***
  • Posts: 3128
    • View Profile
    • csanimefan
Re: table.hideable
« Reply #5 on: April 24, 2011, 10:44:10 PM »
Thank you for fixing that.