Extends
Constructor
new ve.ui.MobileActionsContextItem(context, model, [config])
#
Context item to show extra actions required on mobile.
These actions allow users to do things that are not possible with a virtual keyboard and a fake selection, specifically copy & delete.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
context |
ve.ui.LinearContext | Context the item is in |
|
model |
ve.dm.Model | Model the item is related to |
|
config |
Object |
optional |
Configuration options |
Methods
equals(other) → {boolean}
#
Check whether this context item represents the same content as another
Parameters:
Name | Type | Description |
---|---|---|
other |
ve.ui.ContextItem |
- Inherited from:
- Source:
Returns:
- Type
- boolean
getCommand() → {ve.ui.Command}
#
getDescription() → {string}
#
Get the description.
- Inherited from:
- Source:
Returns:
Item description
- Type
- string
getFragment() → {ve.dm.SurfaceFragment}
#
Get a surface fragment covering the related model node, or the current selection otherwise
- Inherited from:
- Source:
Returns:
Surface fragment
isEditable() → {boolean}
#
Check if item is editable.
- Inherited from:
- Source:
Returns:
Item is editable
- Type
- boolean
isNode() → {boolean}
#
Check if model is a node
- Inherited from:
- Source:
Returns:
Model is a node
- Type
- boolean
isReadOnly() → {boolean}
#
Check if the context's surface is readOnly
- Inherited from:
- Source:
Returns:
Context's surface is readOnly
- Type
- boolean
onCopyButtonClick()
#
Handle copy button click events.
onDeleteButtonClick()
#
Handle delete button click events.
Fires:
onEditButtonClick()protected
#
Handle edit button click events.
- Inherited from:
- Source:
Fires:
renderBody()
#
Render the body.
- Inherited from:
- Source:
setup(refreshing) → {ve.ui.ContextItem}chainable
#
Setup the item.
Parameters:
Name | Type | Description |
---|---|---|
refreshing |
boolean | If this is a reconstruction/refresh of a context |
- Inherited from:
- Source:
Returns:
- Type
- ve.ui.ContextItem
teardown() → {ve.ui.ContextItem}chainable
#
isCompatibleWith()static
#
Events
command()
#
The context executed a ve.ui.Command
- Inherited from:
- Source: