From 43f56c81a89760dc004eb18ea9d10ddc48751b9e Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Thu, 10 Nov 2016 23:22:40 +0000 Subject: [PATCH] Fix MWReferenceGroupInputWidget and uses Now it is an actual input widget, remove references to .input property. Bug: T150491 Change-Id: I826a2cb5ecf98d0e35ccab804f2aa90bbff7ada2 --- modules/ve-cite/ve.ui.MWReferenceDialog.js | 8 ++++---- modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ve-cite/ve.ui.MWReferenceDialog.js b/modules/ve-cite/ve.ui.MWReferenceDialog.js index b52f9e66f..65044717d 100644 --- a/modules/ve-cite/ve.ui.MWReferenceDialog.js +++ b/modules/ve-cite/ve.ui.MWReferenceDialog.js @@ -152,7 +152,7 @@ ve.ui.MWReferenceDialog.prototype.documentHasContent = function () { ve.ui.MWReferenceDialog.prototype.canApply = function () { return this.documentHasContent() && ( this.referenceTarget.getSurface().getModel().hasBeenModified() || - this.referenceGroupInput.input.getValue() !== this.originalGroup ); + this.referenceGroupInput.getValue() !== this.originalGroup ); }; /** @@ -270,7 +270,7 @@ ve.ui.MWReferenceDialog.prototype.useReference = function ( ref ) { this.originalGroup = this.referenceModel.getGroup(); // Set the group input while it's disabled, so this doesn't pop up the group-picker menu this.referenceGroupInput.setDisabled( true ); - this.referenceGroupInput.input.setValue( this.originalGroup ); + this.referenceGroupInput.setValue( this.originalGroup ); this.referenceGroupInput.setDisabled( false ); this.contentFieldset.$element.append( this.referenceTarget.$element ); this.referenceTarget.initialize(); @@ -317,7 +317,7 @@ ve.ui.MWReferenceDialog.prototype.initialize = function () { $overlay: this.$overlay, emptyGroupName: ve.msg( 'cite-ve-dialog-reference-options-group-placeholder' ) } ); - this.referenceGroupInput.input.connect( this, { change: 'onReferenceGroupInputChange' } ); + this.referenceGroupInput.connect( this, { change: 'onReferenceGroupInputChange' } ); this.referenceGroupField = new OO.ui.FieldLayout( this.referenceGroupInput, { align: 'top', label: ve.msg( 'cite-ve-dialog-reference-options-group-label' ) @@ -358,7 +358,7 @@ ve.ui.MWReferenceDialog.prototype.getActionProcess = function ( action ) { return new OO.ui.Process( function () { var surfaceModel = this.getFragment().getSurface(); - this.referenceModel.setGroup( this.referenceGroupInput.input.getValue() ); + this.referenceModel.setGroup( this.referenceGroupInput.getValue() ); // Insert reference (will auto-create an internal item if needed) if ( !( this.selectedNode instanceof ve.dm.MWReferenceNode ) ) { diff --git a/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js b/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js index d6864bb97..3765e15a0 100644 --- a/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js +++ b/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js @@ -21,7 +21,7 @@ ve.ui.MWReferenceGroupInputWidget = function VeUiMWReferenceGroupInputWidget( co this.emptyGroupName = config.emptyGroupName; // Parent constructor - ve.ui.MWReferenceGroupInputWidget.super.call( this, $.extend( true, { input: { placeholder: config.emptyGroupName } }, config ) ); + ve.ui.MWReferenceGroupInputWidget.super.call( this, ve.extendObject( { placeholder: config.emptyGroupName }, config ) ); this.$element.addClass( 've-ui-mwReferenceGroupInputWidget' ); };