new TwoColumn()
wp.media.view.Attachment.Details.TwoColumn
A similar view to media.view.Attachment.Details
for use in the Edit Attachment modal.
Extends
- wp.media.view.Attachment.Details
- wp.media.view.Attachment
- wp.media.View
- wp.Backbone.View
- Backbone.View
Methods
-
_syncAlbum(model, value)
-
Parameters:
Name Type Description model
Backbone.Model value
string - Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining. -
_syncArtist(model, value)
-
Parameters:
Name Type Description model
Backbone.Model value
string - Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining. -
_syncCaption(model, value)
-
Parameters:
Name Type Description model
Backbone.Model value
string - Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining. -
_syncTitle(model, value)
-
Parameters:
Name Type Description model
Backbone.Model value
string - Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining. -
checkClickHandler()
-
Add the model if it isn't in the selection, if it is in the selection, remove it.
Parameters:
Type Description - Inherited From:
- Overrides:
- Source:
Returns:
-
deleteAttachment(event)
-
Deletes an attachment. Deletes an attachment after asking for confirmation. After deletion, keeps focus in the modal.
Parameters:
Name Type Description event
MouseEvent A click event. - Since:
-
- 3.5.0
- Inherited From:
- Source:
Returns:
- Type
- void
-
deselect(model, collection)
-
Parameters:
Name Type Description model
Backbone.Model collection
Backbone.Collection - Inherited From:
- Overrides:
- Source:
-
details(model, collection)
-
Parameters:
Name Type Description model
Backbone.Model collection
Backbone.Collection - Inherited From:
- Overrides:
- Source:
-
dispose()
-
- Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining. -
editAttachment(event)
-
Opens the edit page for a specific attachment.
Parameters:
Name Type Description event
MouseEvent A click event. - Since:
-
- 3.5.0
- Inherited From:
- Source:
Returns:
- Type
- void
-
getFocusableElements()
-
Gets the focusable elements to move focus to.
- Since:
-
- 5.3.0
- Inherited From:
- Source:
-
imageSize(size)
-
Parameters:
Name Type Description size
string - Inherited From:
- Overrides:
- Source:
Returns:
- Type
- Object
-
moveFocus()
-
Moves focus to the previous or next attachment in the grid. Fallbacks to the upload button or media frame when there are no attachments.
- Since:
-
- 5.3.0
- Inherited From:
- Source:
-
moveFocusToLastFallback()
-
Moves focus to the media frame as last fallback.
- Since:
-
- 5.3.0
- Inherited From:
- Source:
-
remove()
-
- Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining.- Type
- wp.media.View
-
removeFromLibrary(event)
-
Parameters:
Name Type Description event
Object - Inherited From:
- Overrides:
- Source:
-
render()
-
- Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining. -
save()
-
Pass all the arguments to the model's save method. Records the aggregate status of all save requests and updates the view's classes accordingly.
- Inherited From:
- Overrides:
- Source:
-
select(model, collection)
-
Parameters:
Name Type Description model
Backbone.Model collection
Backbone.Collection - Inherited From:
- Overrides:
- Source:
-
selected()
-
- Inherited From:
- Overrides:
- Source:
Returns:
- Type
- unresolved | Boolean
-
toggleSelection(options)
-
Parameters:
Name Type Description options
Object - Inherited From:
- Overrides:
- Source:
-
toggleSelectionHandler(event)
-
Triggers an event on the controller when reverse tabbing (shift+tab). This event can be used to make sure to move the focus correctly.
Parameters:
Name Type Description event
KeyboardEvent A keyboard event. - Since:
-
- 4.0.0
- Inherited From:
- Overrides:
- Source:
Fires:
- wp.media.controller.MediaLibrary#attachment:details:shift-tab
- wp.media.controller.MediaLibrary#attachment:keydown:arrow
Returns:
Returns false or undefined.- Type
- boolean | void
-
trashAttachment(event)
-
Sets the Trash state on an attachment, or destroys the model itself. If the mediaTrash setting is set to true, trashes the attachment. Otherwise, the model itself is destroyed.
Parameters:
Name Type Description event
MouseEvent A click event. - Since:
-
- 3.9.0
- Inherited From:
- Source:
Returns:
- Type
- void
-
untrashAttachment(event)
-
Untrashes an attachment.
Parameters:
Name Type Description event
MouseEvent A click event. - Since:
-
- 4.0.0
- Inherited From:
- Source:
Returns:
- Type
- void
-
updateSave(status)
-
Parameters:
Name Type Description status
string - Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining. -
updateSetting(event)
-
Parameters:
Name Type Description event
Object - Inherited From:
- Overrides:
- Source: