Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/189112

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/12/189112/1

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: newchange
Gerrit-Change-Id: I4dd955d015d2bda50e4146b0ae2ddff557dcd346
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to