Extends
Constructor
new ve.ui.MWMobileSaveDialog([config])
#
Dialog for saving MediaWiki pages in mobile.
TODO: Currently this does no overriding so could be removed, but we may want to customise the mobile save dialog in the near future.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
Object |
optional |
Config options |
Methods
clearAllMessages()
#
Remove all messages from the save dialog.
- Inherited from:
- Source:
clearDiff()
#
Clear the diff displayed in the review panel, if any.
- Inherited from:
- Source:
clearMessage(name)
#
Remove a message from the save dialog.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Message's unique name |
- Inherited from:
- Source:
getActionProcess()
#
- Inherited from:
- Source:
getBodyHeight()
#
- Inherited from:
- Source:
getReadyProcess()
#
- Inherited from:
- Source:
getSetupProcess([data])
#
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object |
optional |
Properties:
|
- Inherited from:
- Source:
getTeardownProcess()
#
- Inherited from:
- Source:
initialize()
#
- Overrides:
- Source:
onRetryButtonClick()
#
Handle retry button click events.
Hides errors and then tries again.
- Inherited from:
- Source:
onReviewChoose(item)
#
Update the current review mode
Parameters:
Name | Type | Description |
---|---|---|
item |
OO.ui.OptionWidget | Item chosen |
- Inherited from:
- Source:
popPending()
#
- Inherited from:
- Source:
positionDiffElement()
#
Re-position elements within the diff element
Should be called whenever the diff element's container has changed width.
- Inherited from:
- Source:
Re-position elements within the diff element
Should be called whenever the diff element's container has changed width.
pushPending()
#
- Inherited from:
- Source:
reset()
#
Reset the fields of the save dialog.
- Inherited from:
- Source:
setDiffAndReview(wikitextDiffPromise, visualDiffGeneratorPromise, [baseDoc])
#
Set review content and show review panel.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
wikitextDiffPromise |
jQuery.Promise | Wikitext diff HTML promise |
|
visualDiffGeneratorPromise |
jQuery.Promise | Visual diff promise |
|
baseDoc |
HTMLDocument |
optional |
Base document against which to normalise links when rendering visualDiff |
- Inherited from:
- Source:
setDimensions()
#
- Inherited from:
- Source:
setEditSummary(summary)
#
Change the edit summary prefilled in the save dialog.
This method is safe to call even when the dialog hasn't been initialized yet.
Parameters:
Name | Type | Description |
---|---|---|
summary |
string | Edit summary to prefill |
- Inherited from:
- Source:
setupCheckboxes(checkboxFields)
#
Initialize MediaWiki page specific checkboxes.
This method is safe to call even when the dialog hasn't been initialized yet.
Parameters:
Name | Type | Description |
---|---|---|
checkboxFields |
Array.<OO.ui.FieldLayout> | Checkbox fields |
- Inherited from:
- Source:
showMessage(name, label, config) → {jQuery.Promise}
#
Show a message in the save dialog.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Message's unique name |
label |
jQuery | string | function | OO.ui.HtmlSnippet | Message content. See OO.ui.mixin.LabelElement. |
config |
string | MessageWidget config. Defaults to an inline warning. |
- Inherited from:
- Source:
Returns:
Promise which resolves when the message has been shown, rejects if no new message shown.
- Type
- jQuery.Promise
showPreview(response)
#
Set preview content and show preview panel.
Parameters:
- Inherited from:
- Source:
swapPanel(panel, [noFocus])
#
Swap state in the save dialog.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
panel |
string | One of 'save', 'review' or 'conflict' |
||
noFocus |
boolean |
optional |
false | Don't attempt to focus anything (e.g. while setting up) |
- Inherited from:
- Source:
Throws:
-
Unknown saveDialog panel
- Type
- Error
updateReviewMode([button])
#
Update the current review mode
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
button |
OO.ui.ButtonOptionWidget |
optional |
The button clicked, or false if this is the initial setup |
- Inherited from:
- Source:
Events
preview()
#
Emitted when the user clicks the show preview button
- Inherited from:
- Source:
resolve()
#
Emitted when the user clicks the resolve conflict button
- Inherited from:
- Source:
retry()
#
Emitted when the user clicks the retry/continue save button after an error.
- Inherited from:
- Source:
review()
#
Emitted when the user clicks the review changes button
- Inherited from:
- Source:
save(saveDeferred)
#
Emitted when the user clicks the save button
Parameters:
Name | Type | Description |
---|---|---|
saveDeferred |
jQuery.Deferred | Deferred object to resolve/reject when the save succeeds/fails. |
- Inherited from:
- Source: