Constructor
new ve.ui.EditCheckDialog()abstract
#
EditCheckDialog constructor.
Abstract mixin for FixedEditCheckDialog and SidebarEditCheckDialog.
Methods
clearActionWidgets()
#
Remove all action widgets
findNearestActions() → {Object}
#
getScopedActions() → {Array.<mw.editcheck.EditCheckAction>}
#
Get the actions that this dialog shows
Returns:
Actions
getSetupProcess()
#
getTeardownProcess()
#
initialize()
#
isInScope(action) → {boolean}
#
Check if an action is in this dialog's scope
A dialog with no scope can show all actions.
Parameters:
| Name | Type | Description |
|---|---|---|
action |
mw.editcheck.EditCheckAction |
Returns:
- Type
- boolean
Check if an action is in this dialog's scope
A dialog with no scope can show all actions.
onAct(action, widget, promise)
#
Handle 'act' events from the mw.widget.EditCheckActionWidget.
Parameters:
| Name | Type | Description |
|---|---|---|
action |
mw.editcheck.EditCheckAction | Action |
widget |
mw.editcheck.EditCheckActionWidget | Action's widget |
promise |
jQuery.Promise | Promise which resolves when the action is complete |
onActionsUpdated(listener, actions, newActions, discardedActions, rejected)
#
Handle updates to the list of edit check actions.
Parameters:
| Name | Type | Description |
|---|---|---|
listener |
string | Check listener |
actions |
Array.<mw.editcheck.EditCheckAction> | All current actions |
newActions |
Array.<mw.editcheck.EditCheckAction> | Newly added actions |
discardedActions |
Array.<mw.editcheck.EditCheckAction> | Newly removed actions |
rejected |
boolean | The last action was rejected/dismissed |
onCloseButtonClick()
#
Handle click events from the close button.
onCollapseExpandButtonClick()
#
Handle click events from the collapse/expand button.
onFocusAction(action, index, scrollTo)
#
Handle focusAction events from the controller
Parameters:
| Name | Type | Description |
|---|---|---|
action |
mw.editcheck.EditCheckAction | Action |
index |
number | Index of the action in #getActions |
scrollTo |
boolean | Scroll the action's selection into view |
onNextButtonClick()
#
Handle click events from the next button.
onPreviousButtonClick()
#
Handle click events from the previous button.
onScrollIntoViewCloseClick()
#
Handle click events from scroll-into-view's close button.
onScrollIntoViewShowClick()
#
Handle click events from scroll-into-view's show button.
onToggleCollapse(action)
#
Handle 'togglecollapse' events from the mw.widget.EditCheckActionWidget.
Parameters:
| Name | Type | Description |
|---|---|---|
action |
mw.editcheck.EditCheckAction | Action being expanded/collapsed |
onVirtualKeyboardChange(isOpen)
#
Handle virtualKeyboardChange events from the target
Parameters:
| Name | Type | Description |
|---|---|---|
isOpen |
boolean | The virtual keyboard is open |
ready(data) → {jQuery.Promise}
#
HACK: Override #ready to prevent trying to focus $content
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object |
Returns:
- Type
- jQuery.Promise
refresh()
#
Refresh the action list
scrollToNearestAction([direction]) → {boolean}
#
Scroll to the action nearest the user's current position
If actions exist both above and below, it will default to scrolling to the action above, unless the direction parameter is passed.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
direction |
string |
optional |
If actions exist both above and below, it will scroll in this direction |
Returns:
An action was found and focused
- Type
- boolean
Scroll to the action nearest the user's current position
If actions exist both above and below, it will default to scrolling to the action above, unless the direction parameter is passed.
setCurrentAction(action, fromUserAction, [internal])
#
Set currently active check
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
action |
mw.editcheck.EditCheckAction
|
null
|
New action |
|
fromUserAction |
boolean | The change was triggered by a user action |
|
internal |
boolean |
optional |
Change was triggered internally |
setScope(scope, focusAction)
#
Set the scope of this dialog, and focus an action in it
Parameters:
| Name | Type | Description |
|---|---|---|
scope |
Array.<mw.editcheck.EditCheckAction>
|
null
|
Actions this dialog can show, or null for all actions |
focusAction |
mw.editcheck.EditCheckAction | Action to focus |
showActions(actions, newActions, lastActionRejected)
#
Show the actions list
Parameters:
| Name | Type | Description |
|---|---|---|
actions |
Array.<mw.editcheck.EditCheckAction> | Actions |
newActions |
Array.<mw.editcheck.EditCheckAction> | Newly added actions |
lastActionRejected |
boolean | Last action was rejected/dismissed |
showScopedActions(newActions, [lastActionRejected])
#
Show the current actions in this dialog's scope
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
newActions |
Array.<mw.editcheck.EditCheckAction> | Newly added actions, which the dialog can focus |
|
lastActionRejected |
boolean |
optional |
Last action was rejected/dismissed |