MediaWiki talk:Common.js/Archive 4: Difference between revisions

Content deleted Content added
Shadowbot3 (talk | contribs)
m Automated archival of 1 sections from MediaWiki talk:Common.js
Shadowbot3 (talk | contribs)
m Automated archival of 3 sections from MediaWiki talk:Common.js
Line 167:
::Question: What happens for users with javascript disabled? [[User:Prodego|<font color="darkgreen">''Prodego''</font>]] <sup>[[User talk:Prodego|<font color="darkgreen">talk</font>]]</sup> 19:23, 18 March 2007 (UTC)
:::The edit tools don't appear. Since clicking on them relies on JavaScript anyways, this is not a problem. It's actually better than the current situation since right now the tools show up if you don't have JS enabled, but they don't actually work. [[User talk:Mike Dillon|Mike Dillon]] 19:44, 18 March 2007 (UTC)
<span id="63298081396" />
== Collapsible sections ==
 
I was wondering whether it would be possible to adjust the collapsible table code a little to allow a table to be collapsed section-by-section?
What I was thinking was that you could have a table like this:
{|
|+ <span style="float:right; color: blue;">&#x5B;hide&#x5D;</span>Caption
|-
! colspan="2" | <span style="float:right; color: blue;">&#x5B;hide&#x5D;</span>Section 1
|-
| some stuff || …and more stuff
|-
! colspan="2" | <span style="float:right; color: blue;">&#x5B;hide&#x5D;</span>Section 2
|-
| some stuff || …and more stuff
|}
where clicking the <span style="color: blue;">&#x5B;hide&#x5D;</span> link in the caption hid the entire table whereas the corresponding link in each header-row hid the rows from there up to the next header-row.
 
Would it be difficult to arrange that the intermediate rows, those to be hidden, could have "header cells" in the first column?
 
This would be helpful in quite a few places, like in some infoboxes, where it would be helpful to have much of the information hidden until required.
HTH HAND —[[User:Phil Boswell|Phil]] | [[User talk:Phil Boswell|Talk]] 16:23, 1 March 2007 (UTC)
 
<span id="63298702036" />
== Proposal: Editpage.js ==
Create another «common» javascript file <tt>MediaWiki:Editpage.js</tt> and «call» it from [[MediaWiki:Common.js]] (already implemented e.g. in [[:pl:MediaWiki:Monobook.js]] and [[:ru:MediaWiki:Common.js]]: search for "<tt>Onlyifediting.js</tt>")
if (document.___URL.indexOf('action=edit') > 0 || document.___URL.indexOf('action=submit') > 0)
importScript('MediaWiki:Editpage.js');
Then move from [[MediaWiki:Common.js]] → <tt>MediaWiki:Editpage.js</tt>
* code «Extra toolbar options» (mwCustomEditButtons)
* code «fix edit summary prompt for undo»
— [[User:Alex Smotrov|Alex Smotrov]] 20:47, 8 March 2007 (UTC)
 
 
<span id="63299899636" />
== notcollapsed class in collapsible tables and navframes ==
 
Tables and navframes have collapsed and autocollapse classes, but what about a notcollapsed class that would specify to keep that specific table or frame open by default on a page, but still allow it to be closed. This would come in handy for the Climate Statistics box on [[Denver, Colorado]] (we could leave one of the boxes open by default, but have the other three collapse) and the behavior is not unprecedented (Table of Contents allows show/hide and defaults to open). --[[User:MattWright|MattWright]] ([[User talk:MattWright|talk]]) 18:36, 21 March 2007 (UTC)
 
: Just give it the collapse class, without specifying collaped or autocollapse. —''[[User:Ruud Koot|Ruud]]'' 10:31, 22 March 2007 (UTC)
 
::Thanks for the reply Ruud. --[[User:MattWright|MattWright]] ([[User talk:MattWright|talk]]) 17:27, 22 March 2007 (UTC)