mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
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:
parent
0ab29656b6
commit
ebe2071dfd
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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 ]
|
||||
|
|
Loading…
Reference in a new issue