[MediaWiki-commits] [Gerrit] Fix toggling initialization code - change (mediawiki...MobileFrontend)
jenkins-bot has submitted this change and it was merged. Change subject: Fix toggling initialization code .. Fix toggling initialization code If37a623 introduced a bug in the the toggling initialization code wherein the page parameter of the toggle#enable function was added but the client code was never updated. Bug: T112538 Change-Id: I1166f725927d0564101c72bfad7c493e4d8e79c7 --- M resources/skins.minerva.toggling/init.js 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/skins.minerva.toggling/init.js b/resources/skins.minerva.toggling/init.js index 97ee383..539f1d9 100644 --- a/resources/skins.minerva.toggling/init.js +++ b/resources/skins.minerva.toggling/init.js @@ -10,12 +10,13 @@ * @method * @param {jQuery.Object} $container to enable toggling on * @param {String} prefix a prefix to use for the id. +* @param {Page} page The current page * @ignore */ - function init( $container, prefix ) { + function init( $container, prefix, page ) { // distinguish headings in content from other headings $container.find( '> h1,> h2,> h3,> h4,> h5,> h6' ).addClass( 'section-heading' ); - toggle.enable( $container, prefix ); + toggle.enable( $container, prefix, page ); } // avoid this running on Watchlist @@ -24,6 +25,6 @@ !mw.config.get( 'wgIsMainPage' ) && mw.config.get( 'wgAction' ) === 'view' ) { - init( $contentContainer, 'content-' ); + init( $contentContainer, 'content-', page ); } }( mw.mobileFrontend, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/238165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1166f725927d0564101c72bfad7c493e4d8e79c7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Phuedx Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix toggling initialization code - change (mediawiki...MobileFrontend)
Phuedx has uploaded a new change for review. https://gerrit.wikimedia.org/r/238165 Change subject: Fix toggling initialization code .. Fix toggling initialization code If37a623 introduced a bug in the the toggling initialization code wherein the page parameter of the toggle#enable function was added but the client code was never updated. Bug: T112538 Change-Id: I1166f725927d0564101c72bfad7c493e4d8e79c7 --- M resources/skins.minerva.toggling/init.js 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/65/238165/1 diff --git a/resources/skins.minerva.toggling/init.js b/resources/skins.minerva.toggling/init.js index 97ee383..929952d 100644 --- a/resources/skins.minerva.toggling/init.js +++ b/resources/skins.minerva.toggling/init.js @@ -10,12 +10,13 @@ * @method * @param {jQuery.Object} $container to enable toggling on * @param {String} prefix a prefix to use for the id. +* @param {Page} The current page * @ignore */ - function init( $container, prefix ) { + function init( $container, prefix, page ) { // distinguish headings in content from other headings $container.find( '> h1,> h2,> h3,> h4,> h5,> h6' ).addClass( 'section-heading' ); - toggle.enable( $container, prefix ); + toggle.enable( $container, prefix, page ); } // avoid this running on Watchlist @@ -24,6 +25,6 @@ !mw.config.get( 'wgIsMainPage' ) && mw.config.get( 'wgAction' ) === 'view' ) { - init( $contentContainer, 'content-' ); + init( $contentContainer, 'content-', page ); } }( mw.mobileFrontend, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/238165 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1166f725927d0564101c72bfad7c493e4d8e79c7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Phuedx ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits