Editing
MycoTaxa:Village pump (technical)/Archive 1
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Nested tables class="collapsible collapsed" == If someone knows of a workaround for this issue, I'd like to know what it is too. I couldn't find anything for it in Bugzilla either. I have some nested collapsible tables coded up roughly as follows: <code><pre><nowiki> {|class="collapsible collapsed" !Outer table header row |- | interesting information |- | {|class="collapsible collapsed" !Inner table header row |- | more detailed interesting information |- | {|class="collapsible collapsed" ! Inner inner table header row |- | Even more detailed information that's not particularly interesting |} |} |}</nowiki></pre></code> Here's what it looks like: {|class="collapsible collapsed" !Outer table header row |- | interesting information |- | {|class="collapsible collapsed" !Inner table header row |- | more detailed interesting information |- | {|class="collapsible collapsed" ! Inner inner table header row |- | Even more detailed information that's not particularly interesting |} |} |} All of them should be collapsed by default. But when you expand the outer table, all the inner tables expand as well -- but their "show" links say "show". The Javascript apparently doesn't know they've expanded. When you click on "show" it changes to "hide", but doesn't do anything else. After that, the link works normally. Any thoughts? ''[[User:Csernica|TCC]]'' <small>[[User_talk:Csernica|(talk)]] [[Special:Contributions/Csernica|(contribs)]]</small> 09:58, 1 July 2007 (UTC) :Looks like you aren't using it in the way it was intended. Looks like it doesn't support nesting. I'll take a look around and get you an answer and the correct code in a bit. β[[User:Andrew Hampe|Andrew Hampe]] <sup>[[User talk:Andrew Hampe|Talk]]</sup> 23:17, 1 July 2007 (UTC) ::Just so you're aware then, one requirement is to be able to specify the initial state, which is why I'm using the table instead of NavFrame, etc. ''[[User:Csernica|TCC]]'' <small>[[User_talk:Csernica|(talk)]] [[Special:Contributions/Csernica|(contribs)]]</small> 01:33, 2 July 2007 (UTC) :::You can hide the nested tables by putting 3 NavFrames inside one collapsible table, e.g. {{tl|Calculus footer}}. Even if you're nesting only 2 or less, you can add an empty NavFrame div to make them hidden. I don't know of a way to make the nested NavFrames expand by default though, unless you're nesting 2 or less. β[[User talk:Pomte|Pomte]] 18:55, 24 July 2007 (UTC) ::::That is kind of the problem with using NavFrames, yes. In fits and starts I'm working on a change to the scripting to see if I can get it to work. Going's a bit slow though, as this is my first time working with either Javascript or the DOM. ''[[User:Csernica|TCC]]'' <small>[[User_talk:Csernica|(talk)]] [[Special:Contributions/Csernica|(contribs)]]</small> 02:07, 10 August 2007 (UTC) Sorted it. I'd made a silly mistake about the order in which scripts are executed on a page load. It's probably very klugy, so I wonder if someone experienced in JS and the DOM could have a look at it and tell me if I've done anything boneheaded? See [[User:Csernica/monobook.js]]. And what might be the chances of getting this into Common.js? ''[[User:Csernica|TCC]]'' <small>[[User_talk:Csernica|(talk)]] [[Special:Contributions/Csernica|(contribs)]]</small> 07:26, 15 August 2007 (UTC)
Summary:
Please note that all contributions to MycoTaxa may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
MycoTaxa:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Project page
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
In other projects