2024-11-19 13:41:38 +00:00
|
|
|
/**
|
|
|
|
* EditCheckAction
|
|
|
|
*
|
|
|
|
* @param {Object} config
|
|
|
|
* @param {mw.editcheck.BaseEditCheck} check
|
|
|
|
* @param {ve.dm.SurfaceFragment[]} highlights Fragments to highlight
|
|
|
|
* @param {ve.dm.SurfaceFragment} selection Fragment to select when acting
|
|
|
|
* @param {jQuery|string|Function|OO.ui.HtmlSnippet} message Check message body
|
|
|
|
*/
|
2024-03-14 17:17:36 +00:00
|
|
|
mw.editcheck.EditCheckAction = function MWEditCheckAction( config ) {
|
|
|
|
this.check = config.check;
|
2024-11-05 11:41:50 +00:00
|
|
|
this.highlights = config.highlights;
|
2024-03-14 17:17:36 +00:00
|
|
|
this.selection = config.selection;
|
|
|
|
this.message = config.message;
|
|
|
|
};
|
|
|
|
|
|
|
|
OO.initClass( mw.editcheck.EditCheckAction );
|
|
|
|
|
2024-11-19 13:41:38 +00:00
|
|
|
/**
|
|
|
|
* Get the available choices
|
|
|
|
*
|
|
|
|
* @return {Object[]}
|
|
|
|
*/
|
2024-03-14 17:17:36 +00:00
|
|
|
mw.editcheck.EditCheckAction.prototype.getChoices = function () {
|
|
|
|
return this.check.getChoices( this );
|
|
|
|
};
|
|
|
|
|
2024-11-19 13:41:38 +00:00
|
|
|
/**
|
|
|
|
* Get a description of the check
|
|
|
|
*
|
|
|
|
* @return {string}
|
|
|
|
*/
|
2024-03-14 17:17:36 +00:00
|
|
|
mw.editcheck.EditCheckAction.prototype.getDescription = function () {
|
|
|
|
return this.check.getDescription( this );
|
|
|
|
};
|