Matmarex has uploaded a new change for review.
https://gerrit.wikimedia.org/r/54210
Change subject: (bug 46239) jquery.makeCollapsible: don't fail if no options
given
......................................................................
(bug 46239) jquery.makeCollapsible: don't fail if no options given
Also a typo elsewhere. That's what you get when coding at 2 AM.
Change-Id: I8dd4f0d06cc5dbf7fe67f2b584c9afe8f5d1b36a
---
M resources/jquery/jquery.makeCollapsible.js
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/10/54210/1
diff --git a/resources/jquery/jquery.makeCollapsible.js
b/resources/jquery/jquery.makeCollapsible.js
index e8e59d0..630002d 100644
--- a/resources/jquery/jquery.makeCollapsible.js
+++ b/resources/jquery/jquery.makeCollapsible.js
@@ -247,6 +247,10 @@
var $collapsible, collapsetext, expandtext, $toggle,
$toggleLink, $firstItem, collapsibleId,
$customTogglers, firstval;
+ if ( options === undefined ) {
+ options = {};
+ }
+
// Ensure class "mw-collapsible" is present in case
.makeCollapsible()
// is called on element(s) that don't have it yet.
$collapsible = $(this).addClass( 'mw-collapsible' );
@@ -259,7 +263,7 @@
}
// Use custom text or default?
- collapsetext = options.collapsetext ||
$collapsible.attr( 'data-collapsetext' ) || mw.msg( 'collapsible-collapse' );
+ collapsetext = options.collapseText ||
$collapsible.attr( 'data-collapsetext' ) || mw.msg( 'collapsible-collapse' );
expandtext = options.expandText || $collapsible.attr(
'data-expandtext' ) || mw.msg( 'collapsible-expand' );
// Create toggle link with a space around the brackets
( [text] )
--
To view, visit https://gerrit.wikimedia.org/r/54210
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dd4f0d06cc5dbf7fe67f2b584c9afe8f5d1b36a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits