Expand all

abstract ve.ui.EditCheckDialog

Constructor

new ve.ui.EditCheckDialog()abstract #

EditCheckDialog constructor.

Abstract mixin for FixedEditCheckDialog and SidebarEditCheckDialog.

Source:
EditCheckDialog constructor.

Methods

clearActionWidgets() #

Remove all action widgets

Source:
Remove all action widgets

findNearestActions() → {Object} #

Find nearest actions above and below user's current position

Returns:

Type
Object
Source:
Find nearest actions above and below user's current position

getScopedActions() → {Array.<mw.editcheck.EditCheckAction>} #

Get the actions that this dialog shows

Returns:

Actions

Type
Array.<mw.editcheck.EditCheckAction>
Source:
Get the actions that this dialog shows

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
Source:

Check if an action is in this dialog's scope

A dialog with no scope can show all actions.

Find adjacent suggestion/check and navigate to it.

Parameters:

Name Type Description
next boolean

If true, navigates to the next suggestion, otherwise to previous.

Source:
Find adjacent suggestion/check and navigate to it.

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

Source:
Handle 'act' events from the mw.widget.EditCheckActionWidget.

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

Source:
Handle updates to the list of edit check actions.

onCloseButtonClick() #

Handle click events from the close button.

Source:
Handle click events from the close button.

onCollapseExpandButtonClick() #

Handle click events from the collapse/expand button.

Source:
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

Source:
Handle focusAction events from the controller

onNextButtonClick() #

Handle click events from the next button.

Source:
Handle click events from the next button.

onPreviousButtonClick() #

Handle click events from the previous button.

Source:
Handle click events from the previous button.

onScrollIntoViewCloseClick() #

Handle click events from scroll-into-view's close button.

Source:
Handle click events from scroll-into-view's close button.

onScrollIntoViewShowClick() #

Handle click events from scroll-into-view's show button.

Source:
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

Source:
Handle 'togglecollapse' events from the mw.widget.EditCheckActionWidget.

onVirtualKeyboardChange(isOpen) #

Handle virtualKeyboardChange events from the target

Parameters:

Name Type Description
isOpen boolean

The virtual keyboard is open

Source:
Handle virtualKeyboardChange events from the target

ready(data) → {jQuery.Promise} #

HACK: Override #ready to prevent trying to focus $content

Parameters:

Name Type Description
data Object

Returns:

Type
jQuery.Promise
Source:
HACK: Override #ready to prevent trying to focus $content

refresh() #

Refresh the action list

Source:
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
Source:

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

Source:
Set currently active check

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

Source:
Set the scope of this dialog, and focus an action in it

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

Source:
Show the actions list

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

Source:
Show the current actions in this dialog's scope

updateNavigationState() #

Update the disabled state of the navigation buttons

Source:
Update the disabled state of the navigation buttons