jenkins-bot has submitted this change and it was merged.
Change subject: ve.ui.MWTocWidget: Rename .toggle property
......................................................................
ve.ui.MWTocWidget: Rename .toggle property
It conflicts with the #toggle method. This happened to work because we
never called .toggle() here, but 8a53b2cd introduced such a call.
Follow-up to 8a53b2cd.
Bug: T88831
Change-Id: I4dd955d015d2bda50e4146b0ae2ddff557dcd346
---
M modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js
1 file changed, 8 insertions(+), 8 deletions(-)
Approvals:
Krinkle: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js
b/modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js
index 3979497..961b016 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js
@@ -37,7 +37,7 @@
this.mwTOCDisable = false;
// TODO: fix i18n
- this.toggle = {
+ this.tocToggle = {
hideMsg: ve.msg( 'hidetoc' ),
showMsg: ve.msg( 'showtoc' ),
$link: this.$( '<a class="internal" id="togglelink"></a>'
).text( ve.msg( 'hidetoc' ) ),
@@ -46,7 +46,7 @@
this.$element.addClass( 'toc ve-ui-mwTocWidget' ).append(
this.$( '<div>' ).attr( 'id', 'toctitle' ).append(
this.$( '<h2>' ).text( ve.msg( 'toc' ) ),
- this.$( '<span>' ).addClass( 'toctoggle' ).append(
this.toggle.$link )
+ this.$( '<span>' ).addClass( 'toctoggle' ).append(
this.tocToggle.$link )
),
this.topics.$group, this.$tempTopics
);
@@ -54,13 +54,13 @@
// Integration ignores hiding the TOC widget, though continues to hide
the real page TOC
$( '#bodyContent' ).append( this.$element );
- this.toggle.$link.on( 'click', function () {
- if ( widget.toggle.open ) {
- widget.toggle.$link.text( widget.toggle.showMsg );
- widget.toggle.open = false;
+ this.tocToggle.$link.on( 'click', function () {
+ if ( widget.tocToggle.open ) {
+ widget.tocToggle.$link.text( widget.tocToggle.showMsg );
+ widget.tocToggle.open = false;
} else {
- widget.toggle.$link.text( widget.toggle.hideMsg );
- widget.toggle.open = true;
+ widget.tocToggle.$link.text( widget.tocToggle.hideMsg );
+ widget.tocToggle.open = true;
}
// FIXME: We should really use CSS here
widget.topics.$group.add( widget.$tempTopics ).slideToggle();
--
To view, visit https://gerrit.wikimedia.org/r/189112
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4dd955d015d2bda50e4146b0ae2ddff557dcd346
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits