https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113812
Revision: 113812
Author: jdlrobson
Date: 2012-03-14 15:20:33 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
allow sections to be non-numbers
the footer would like to introduce a section
that can be toggled. This allows us to give it a name
other than a number so it doesn't interfere with
article body sections
Modified Paths:
--------------
trunk/extensions/MobileFrontend/javascripts/toggle.js
Modified: trunk/extensions/MobileFrontend/javascripts/toggle.js
===================================================================
--- trunk/extensions/MobileFrontend/javascripts/toggle.js 2012-03-14
15:18:16 UTC (rev 113811)
+++ trunk/extensions/MobileFrontend/javascripts/toggle.js 2012-03-14
15:20:33 UTC (rev 113812)
@@ -15,9 +15,9 @@
}
function openSectionHandler() {
- var sectionNumber = this.id ? this.id.split( '_' )[1] :
-1;
- if( sectionNumber > -1 ) {
- wm_toggle_section( sectionNumber );
+ var sectionName = this.id ? this.id.split( '_' )[1] :
-1;
+ if( sectionName !== -1 ) {
+ wm_toggle_section( sectionName );
}
}
function createButton( visible ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs