Merge "Use short syntax for transforming one event into another"

This commit is contained in:
jenkins-bot 2022-07-12 11:28:06 +00:00 committed by Gerrit Code Review
commit b736727b07
2 changed files with 4 additions and 19 deletions

View file

@ -1089,15 +1089,6 @@ ve.init.mw.ArticleTarget.prototype.onSaveDialogRetry = function () {
}
};
/**
* Handle dialog close events.
*
* @fires saveWorkflowEnd
*/
ve.init.mw.ArticleTarget.prototype.onSaveDialogClose = function () {
this.emit( 'saveWorkflowEnd' );
};
/**
* Load the editor.
*
@ -1950,7 +1941,8 @@ ve.init.mw.ArticleTarget.prototype.showSaveDialog = function ( action, checkboxN
preview: 'onSaveDialogPreview',
resolve: 'onSaveDialogResolveConflict',
retry: 'onSaveDialogRetry',
close: 'onSaveDialogClose'
// The array syntax is a way to call `this.emit( 'saveWorkflowEnd' )`.
close: [ 'emit', 'saveWorkflowEnd' ]
} );
// Attach custom overlay

View file

@ -33,7 +33,8 @@ ve.ui.MWTransclusionOutlinePartWidget = function VeUiMWTransclusionOutlinePartWi
this.header = new ve.ui.MWTransclusionOutlineButtonWidget( config )
.connect( this, {
keyPressed: 'onHeaderKeyPressed',
click: 'onHeaderClick'
// The array syntax is a way to call `this.emit( 'transclusionPartSelected', … )`.
click: [ 'emit', 'transclusionPartSelected', part.getId() ]
} );
if ( config.ariaDescriptionUnselected ) {
@ -100,14 +101,6 @@ ve.ui.MWTransclusionOutlinePartWidget.prototype.onHeaderKeyPressed = function (
}
};
/**
* @protected
* @fires transclusionPartSelected
*/
ve.ui.MWTransclusionOutlinePartWidget.prototype.onHeaderClick = function () {
this.emit( 'transclusionPartSelected', this.getData() );
};
/**
* Convenience method, modelled after {@see OO.ui.OptionWidget}, but this isn't one.
*