Extends
Constructor
new ve.ui.MWTemplateDialog([config])abstract
#
Abstract base class for dialogs that allow to insert and edit MediaWiki transclusions, i.e. a sequence of one or more template invocations that strictly belong to each other (e.g. because they are unbalanced), possibly mixed with raw wikitext snippets. Currently used for:
- {@see ve.ui.MWTransclusionDialog} for arbitrary transclusions. Registered via the name "transclusion".
- {@see ve.ui.MWCitationDialog} in the Cite extension for the predefined citation types from [[MediaWiki:visualeditor-cite-tool-definition.json]]. These are strictly limited to a single template invocation. Registered via the name "cite".
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
Object |
optional |
Configuration options |
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
transclusionModel |
ve.dm.MWTransclusionModel
|
null
|
|||
sidebar |
ve.ui.MWTransclusionOutlineWidget | |||
canGoBack |
boolean |
optional |
false |
Properties
bookletLayoutConfigstatic
#
Configuration for the {@see ve.ui.MWTwoPaneTransclusionDialogLayout} used in this dialog.
Properties:
Type | Description |
---|---|
Object |
Methods
checkRequiredParameters() → {jQuery.Deferred}private
#
If the user has left blank required parameters, confirm that they actually want to do this. If no required parameters were left blank, or if they were but the user decided to go ahead anyway, the returned deferred will be resolved. Otherwise, the returned deferred will be rejected.
Returns:
- Type
- jQuery.Deferred
getActionProcess()
#
getBodyHeight()
#
getMessageButton(message, icon) → {OO.ui.ButtonWidget}private
#
Converts a message link into an OO.ui.ButtonWidget with an icon.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | i18n message key |
icon |
string | icon name |
Returns:
- Type
- OO.ui.ButtonWidget
getPageFromPart(part) → {OO.ui.PageLayout|null
}protected
#
null
}protected
#
Get a page for a transclusion part.
Parameters:
Name | Type | Description |
---|---|---|
part |
ve.dm.MWTransclusionModel | Part to get page for |
Returns:
Page for part, null if no matching page could be found
- Type
-
OO.ui.PageLayout
|
null
getReadyProcess()
#
getSelectedNode()
#
getSetupProcess()
#
getTeardownProcess()
#
initialize()
#
initializeTemplateParameters()
#
Intentionally empty. This is provided for Wikia extensibility.
onAddParameter(param)private
#
onHasValueChange(pageName, hasValue)private
#
Parameters:
Name | Type | Description |
---|---|---|
pageName |
string | |
hasValue |
boolean |
onRemoveParameter(param)private
#
Handle remove param events.
Parameters:
Name | Type | Description |
---|---|---|
param |
ve.dm.MWParameterModel | Removed param |
onReplacePart(removed, added)protected
#
Handle parts being replaced.
Parameters:
Name | Type | Description |
---|---|---|
removed |
ve.dm.MWTransclusionPartModel
|
null
|
Removed part |
added |
ve.dm.MWTransclusionPartModel
|
null
|
Added part |
setApplicableStatus()private
#
Sets transclusion applicable status
If the transclusion is empty or only contains a placeholder it will not be insertable. If the transclusion only contains a placeholder it will not be editable.
Sets transclusion applicable status
If the transclusion is empty or only contains a placeholder it will not be insertable.
touch()private
#
Update dialog actions whenever the content changes.
updateTitle()protected
#
Update the dialog title.