mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-18 01:00:45 +00:00
43b49080c9
Change-Id: Ia250a0c09d700b0f8e78bf2ea9c17e35b8c40d6d
36 lines
933 B
JavaScript
36 lines
933 B
JavaScript
/**
|
|
* 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
|
|
*/
|
|
mw.editcheck.EditCheckAction = function MWEditCheckAction( config ) {
|
|
this.check = config.check;
|
|
this.highlights = config.highlights;
|
|
this.selection = config.selection;
|
|
this.message = config.message;
|
|
};
|
|
|
|
OO.initClass( mw.editcheck.EditCheckAction );
|
|
|
|
/**
|
|
* Get the available choices
|
|
*
|
|
* @return {Object[]}
|
|
*/
|
|
mw.editcheck.EditCheckAction.prototype.getChoices = function () {
|
|
return this.check.getChoices( this );
|
|
};
|
|
|
|
/**
|
|
* Get a description of the check
|
|
*
|
|
* @return {string}
|
|
*/
|
|
mw.editcheck.EditCheckAction.prototype.getDescription = function () {
|
|
return this.check.getDescription( this );
|
|
};
|