Expand all

mw.editcheck.EditCheckActionWidget

Extends

Constructor

new mw.editcheck.EditCheckActionWidget(config) #

Parameters:

Name Type Description
config Object

Configuration options

Properties:
Name Type Attributes Default Description
type string

Type of message (e.g., 'warning', 'error')

name string

Unique name of the action

checkName string optional

Registered name of the check that made the action

isSystemCheck boolean optional

The check that made the action is a system check

label string | jQuery | function | OO.ui.HtmlSnippet

Title

message string | jQuery | function | OO.ui.HtmlSnippet

Body message

footer string | jQuery | function | OO.ui.HtmlSnippet optional

Footer message

icon string optional

Icon name

singleAction boolean optional

This is the only action shown

choices Array.<Object> optional

User choices

mode string optional

Mode for the action set widget

suggestion boolean optional

This is a suggestion

experimental boolean optional

This is an experimental check (not enabled by default)

collapsible boolean optional
true

Whether the widget can be expanded out of its collapsed state

Source:
EditCheckActionWidget

Methods

onActionsChange() #

Handle change events on the action set

Source:
Handle change events on the action set

onClick(e) #

Handle click events anywhere on the widget

Parameters:

Name Type Description
e jQuery.Event

Click event

Fires:

Source:
Handle click events anywhere on the widget

onFeedbackSelect() #

Open suggestion mode feedback dialog

Source:
Open suggestion mode feedback dialog

onMouseEnter() #

Handle mouse enter events on the widget

Source:
Handle mouse enter events on the widget

onMouseLeave() #

Handle mouse leave events on the widget

Source:
Handle mouse leave events on the widget

setFetchSelectionElements(fetchSelectionElements) #

Set the selection elements for this action

Parameters:

Name Type Description
fetchSelectionElements function

Function that returns an array of selection elements (ve.ce.SelectionManager.SelectionElements[])

Source:
Set the selection elements for this action

setMessage(message) #

Set the message body of the widget and add click tracking + link modifiers

Created solely for use by SourceVerificationEditCheck to update the message body when citation numbers change. This may be unnecessary if we can just rerender the action instead.

Parameters:

Name Type Description
message string | jQuery | function | OO.ui.HtmlSnippet

Body message

Source:

Set the message body of the widget and add click tracking + link modifiers

Created solely for use by SourceVerificationEditCheck to update the message body when citation numbers change.

setMode(mode) #

Set the mode

Parameters:

Name Type Description
mode string
Source:
Set the mode

showFeedback(data) → {jQuery.Promise} #

Show a feedback panel

Parameters:

Name Type Description
data Object
Properties:
Name Type Attributes Default Description
description string optional
choices Array.<Object>
allowInSuggestions boolean optional
false
suppressFeedback boolean optional
false

Returns:

Promise which resolves when feedback is submitted or is rejected when back is chosen

Type
jQuery.Promise
Source:
Show a feedback panel

toggleCollapse([collapsed]) #

Toggle the collapsed state of the widget

Parameters:

Name Type Attributes Description
collapsed boolean optional

The new collapsed state, toggles if unset

Source:
Toggle the collapsed state of the widget

Events

actionClick() #

Fired when action set emits a click event

Source:
Fired when action set emits a click event

togglecollapse() #

Fired when the user toggles the collapsed state of the widget.

Source:
Fired when the user toggles the collapsed state of the widget.