Extends
Methods
addNewImage(title)
#
Request a new image and highlight it
Parameters:
Name | Type | Description |
---|---|---|
title |
string | Normalized title of the new image |
createCaptionDocument(captionNode) → {ve.dm.Document}private
#
Get a new caption document for the gallery caption or an image caption.
Parameters:
Name | Type | Description |
---|---|---|
captionNode |
ve.dm.MWGalleryCaptionNode
|
ve.dm.MWGalleryImageCaptionNode
|
null
|
Returns:
- Type
- ve.dm.Document
getBodyHeight()
#
getReadyProcess()
#
getSetupProcess()
#
getTeardownProcess()
#
initialize()
#
insertOrUpdateNode()
#
Insert or update the node in the document model from the new values
isHighlightedItemModified() → {boolean}
#
Check if currently highlighted item's attributes or contents would be modified if changes were applied.
Returns:
- Type
- boolean
Check if currently highlighted item's attributes or contents would be modified if changes were applied.
isSaveable() → {boolean}
#
Check if gallery attributes or contents would be modified if changes were applied.
Returns:
- Type
- boolean
onAltTextSameAsCaptionChange()
#
Handle change event for this.altTextSameAsCaption
onHighlightItem([item], [removedItemIndex])
#
Handle clicking on an image in the menu
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
item |
ve.ui.MWGalleryItemWidget |
optional |
The item that was clicked on |
removedItemIndex |
number |
optional |
Index of just-removed item |
onHighlightedCaptionTargetChange()
#
Handle change event for this.highlightedCaptionTarget
onModeDropdownChange()
#
Handle change event for this.modeDropdown
onRemoveItem()
#
Handle click event for the remove button
onRequestImagesSuccess(response)
#
Create items for the returned images and add them to the gallery group
Parameters:
Name | Type | Description |
---|---|---|
response |
Object | jQuery response object |
onSearchResultsChoose(item)
#
Handle search results choose event.
Parameters:
Name | Type | Description |
---|---|---|
item |
mw.widgets.MediaResultWidget | Chosen item |
onShowSearchPanelButtonClick()
#
Handle click event for showSearchPanelButton
requestImages(options) → {jQuery.Promise}
#
Request the images for the images tab panel menu
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Options for the request |
Returns:
Promise which resolves when image data has been fetched
- Type
- jQuery.Promise
toggleEmptyGalleryMessage(empty)
#
Toggle the empty gallery message
Parameters:
Name | Type | Description |
---|---|---|
empty |
boolean | The gallery is empty |
toggleSearchPanel([visible])
#
Toggle the search panel (and the edit panel, the opposite way)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
visible |
boolean |
optional |
The search panel is visible |
updateActions()
#
Disable the "Done" button if the gallery is empty, otherwise enable it
TODO Disable the button until the user makes any changes
Disable the "Done" button if the gallery is empty, otherwise enable it
TODO Disable the button until the user makes any changes
updateDialogSize()
#
Resize the dialog according to which panel is focused
updateHighlightedItem()
#
Update the image currently being edited (ve.ui.MWGalleryItemWidget) with the values from inputs in this dialog (currently only the image caption).
Update the image currently being edited (ve.ui.MWGalleryItemWidget) with the values from inputs in this dialog (currently only the image caption).
updateMwData(mwData)private
#
Update the 'mw' attribute with data from inputs in the dialog.
Parameters:
Name | Type | Description |
---|---|---|
mwData |
Object | Value of the 'mw' attribute, updated in-place |