Extends
Constructor
new mw.editcheck.EditCheckActionWidget(config)
#
EditCheckActionWidget
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | Configuration options Properties:
|
Methods
destroy()
#
Remove the elements that this widget added outside of its own element
Call this when the widget is removed from the page.
Remove the elements that this widget added outside of its own element
Call this when the widget is removed from the page.
onActionsChange()
#
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:
onFeedbackSelect()
#
Open suggestion mode feedback dialog
onMouseEnter()
#
Handle mouse enter events on the widget
onMouseLeave()
#
Handle mouse leave events on the widget
setDisabled()
#
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[]) |
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 |
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 |
showFeedback(data) → {jQuery.Promise}
#
Show a feedback panel
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object |
Properties: |
Returns:
Promise which resolves when feedback is submitted or is rejected when back is chosen
- Type
- jQuery.Promise
toggleCollapse([collapsed])
#
Toggle the collapsed state of the widget
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
collapsed |
boolean |
optional |
The new collapsed state, toggles if unset |
Events
actionClick()
#
Fired when action set emits a click event
togglecollapse()
#
Fired when the user toggles the collapsed state of the widget.