Expand all

mw.editcheck.EditCheckActionWidget

Extends

Constructor

new mw.editcheck.EditCheckActionWidget(config) #

Parameters:

Name Type Description
config Object

Configuration options

Properties:
Name Type Attributes Description
type string

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

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)

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

setInactiveSelectionElements(selectionElements) #

Set the selection elements for this action

Parameters:

Name Type Description
selectionElements ve.ce.SelectionManager.SelectionElements
Source:
Set the selection elements for this action

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 Description
title string
description string optional
choices Array.<Object>

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.