Upstream setPending to ReplyWidget

Now consistently uses setReadOnly instead of setDisabled.

Slight styling regression was fixed in I01e11c2ed.

Change-Id: Ice7ce00929ff9a53d0fb533f1094e7324749f3a4
This commit is contained in:
Ed Sanders 2020-08-21 20:43:05 +01:00 committed by Bartosz Dziewoński
parent 0ab29656b6
commit ebe2071dfd
3 changed files with 4 additions and 25 deletions

View file

@ -220,9 +220,13 @@ ReplyWidget.prototype.setPending = function ( pending ) {
if ( pending ) {
this.replyButton.setDisabled( true );
this.cancelButton.setDisabled( true );
this.replyBodyWidget.setReadOnly( true );
this.replyBodyWidget.pushPending();
} else {
this.replyButton.setDisabled( false );
this.cancelButton.setDisabled( false );
this.replyBodyWidget.setReadOnly( false );
this.replyBodyWidget.popPending();
this.updateButtons();
}
};

View file

@ -115,19 +115,6 @@ ReplyWidgetPlain.prototype.onKeyDown = function ( e ) {
}
};
ReplyWidgetPlain.prototype.setPending = function ( pending ) {
// Parent method
ReplyWidgetPlain.super.prototype.setPending.call( this, pending );
if ( pending ) {
this.replyBodyWidget.pushPending();
this.replyBodyWidget.setDisabled( true );
} else {
this.replyBodyWidget.popPending();
this.replyBodyWidget.setDisabled( false );
}
};
ReplyWidgetPlain.prototype.getValue = function () {
return this.replyBodyWidget.getValue();
};

View file

@ -133,18 +133,6 @@ ReplyWidgetVisual.prototype.focus = function () {
return this;
};
ReplyWidgetVisual.prototype.setPending = function ( pending ) {
ReplyWidgetVisual.super.prototype.setPending.call( this, pending );
if ( pending ) {
this.replyBodyWidget.pushPending();
this.replyBodyWidget.setReadOnly( true );
} else {
this.replyBodyWidget.popPending();
this.replyBodyWidget.setReadOnly( false );
}
};
ve.trackSubscribe( 'activity.', function ( topic, data ) {
mw.track( 'dt.schemaVisualEditorFeatureUse', ve.extendObject( data, {
feature: topic.split( '.' )[ 1 ]