jenkins-bot has submitted this change and it was merged.

Change subject: Pages inspector fixes
......................................................................


Pages inspector fixes

* Don't use this.constructor.super, it would fail in a subclass
* Initialise body.extsrc in empty object
* Fix typo in PagequalityInspector that was causing both
  teardown methods to fail

Bug: T139889
Change-Id: Id8474bd5e49e99876ea7ac9ed2b1b0655bfbb264
---
M modules/ve/node/ve.ui.MWPagequalityInspector.js
M modules/ve/node/ve.ui.MWPagesInspector.js
2 files changed, 16 insertions(+), 7 deletions(-)

Approvals:
  Tpt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve/node/ve.ui.MWPagequalityInspector.js 
b/modules/ve/node/ve.ui.MWPagequalityInspector.js
index c9aaa2a..c1be25d 100644
--- a/modules/ve/node/ve.ui.MWPagequalityInspector.js
+++ b/modules/ve/node/ve.ui.MWPagequalityInspector.js
@@ -92,7 +92,7 @@
 /**
  * @inheritdoc
  */
-ve.ui.MWPagesInspector.prototype.getTeardownProcess = function ( data ) {
+ve.ui.MWPagequalityInspector.prototype.getTeardownProcess = function ( data ) {
        return this.constructor.super.prototype.getTeardownProcess.call( this, 
data )
                .next( function () {
                        if ( this.validatedLevelRemoved ) {
diff --git a/modules/ve/node/ve.ui.MWPagesInspector.js 
b/modules/ve/node/ve.ui.MWPagesInspector.js
index ab5b1f5..604eeb5 100644
--- a/modules/ve/node/ve.ui.MWPagesInspector.js
+++ b/modules/ve/node/ve.ui.MWPagesInspector.js
@@ -1,5 +1,5 @@
 /**
- * mw pages tag inspector.
+ * Pages tag inspector.
  *
  * @class
  * @extends ve.ui.MWExtensionInspector
@@ -11,9 +11,11 @@
 };
 
 /* Inheritance */
+
 OO.inheritClass( ve.ui.MWPagesInspector, ve.ui.MWExtensionInspector );
 
 /* Static properties */
+
 ve.ui.MWPagesInspector.static.name = 'pages';
 
 ve.ui.MWPagesInspector.static.icon = 'articles';
@@ -27,11 +29,13 @@
 ve.ui.MWPagesInspector.static.delayForIndexInput = 2000;
 
 /* Methods */
+
 /**
  * @inheritdoc
  */
 ve.ui.MWPagesInspector.prototype.initialize = function () {
-       this.constructor.super.prototype.initialize.apply( this, arguments );
+       // Parent method
+       ve.ui.MWPagesInspector.super.prototype.initialize.apply( this, 
arguments );
 
        this.attributeInputs = {};
        this.$attributes = $( '<div>' );
@@ -42,10 +46,12 @@
  * @inheritdoc
  */
 ve.ui.MWPagesInspector.prototype.getSetupProcess = function ( data ) {
-       return this.constructor.super.prototype.getSetupProcess.call( this, 
data )
+       // Parent method
+       return ve.ui.MWPagesInspector.super.prototype.getSetupProcess.call( 
this, data )
                .next( function () {
                        this.mwData = ( this.selectedNode !== null && 
this.selectedNode.getAttribute( 'mw' ) ) || {
-                               attrs: {}
+                               attrs: {},
+                               body: { extsrc: '' }
                        };
 
                        this.setupForm();
@@ -220,7 +226,8 @@
  * @inheritdoc
  */
 ve.ui.MWPagesInspector.prototype.getTeardownProcess = function ( data ) {
-       return this.constructor.super.prototype.getTeardownProcess.call( this, 
data )
+       // Parent method
+       return ve.ui.MWPagesInspector.super.prototype.getTeardownProcess.call( 
this, data )
                .next( function () {
                        this.teardownForm();
                }, this );
@@ -232,7 +239,8 @@
 ve.ui.MWPagesInspector.prototype.updateMwData = function ( mwData ) {
        var key;
 
-       this.constructor.super.prototype.updateMwData.call( this, mwData );
+       // Parent method
+       ve.ui.MWPagesInspector.super.prototype.updateMwData.call( this, mwData 
);
 
        mwData.attrs = mwData.attrs || {};
        for ( key in this.attributeInputs ) {
@@ -241,4 +249,5 @@
 };
 
 /* Registration */
+
 ve.ui.windowFactory.register( ve.ui.MWPagesInspector );

-- 
To view, visit https://gerrit.wikimedia.org/r/298472
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8474bd5e49e99876ea7ac9ed2b1b0655bfbb264
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: DLynch <[email protected]>
Gerrit-Reviewer: Tpt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to