Class: Details

wp.media.view.Attachment. Details


new Details()

Shows the details of an attachment.
Since:
  • 3.5.0
Source:
Returns:
Type
void

Extends

Classes

TwoColumn

Methods


_syncAlbum(model, value)

Parameters:
Name Type Description
model Backbone.Model
value string
Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Attachment

_syncArtist(model, value)

Parameters:
Name Type Description
model Backbone.Model
value string
Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Attachment

_syncCaption(model, value)

Parameters:
Name Type Description
model Backbone.Model
value string
Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Attachment

_syncTitle(model, value)

Parameters:
Name Type Description
model Backbone.Model
value string
Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Attachment

checkClickHandler()

Add the model if it isn't in the selection, if it is in the selection, remove it.
Parameters:
Type Description
Inherited From:
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
Source:
Returns:
Type
void

deselect(model, collection)

Parameters:
Name Type Description
model Backbone.Model
collection Backbone.Collection
Inherited From:
Source:

details(model, collection)

Parameters:
Name Type Description
model Backbone.Model
collection Backbone.Collection
Inherited From:
Source:

dispose()

Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Attachment

editAttachment(event)

Opens the edit page for a specific attachment.
Parameters:
Name Type Description
event MouseEvent A click event.
Since:
  • 3.5.0
Source:
Returns:
Type
void

getFocusableElements()

Gets the focusable elements to move focus to.
Since:
  • 5.3.0
Source:

imageSize(size)

Parameters:
Name Type Description
size string
Inherited From:
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
Source:

moveFocusToLastFallback()

Moves focus to the media frame as last fallback.
Since:
  • 5.3.0
Source:

remove()

Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.View

removeFromLibrary(event)

Parameters:
Name Type Description
event Object
Inherited From:
Source:

render()

Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Attachment

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:
Source:

select(model, collection)

Parameters:
Name Type Description
model Backbone.Model
collection Backbone.Collection
Inherited From:
Source:

selected()

Inherited From:
Source:
Returns:
Type
unresolved | Boolean

toggleSelection(options)

Parameters:
Name Type Description
options Object
Inherited From:
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
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
Source:
Returns:
Type
void

untrashAttachment(event)

Untrashes an attachment.
Parameters:
Name Type Description
event MouseEvent A click event.
Since:
  • 4.0.0
Source:
Returns:
Type
void

updateSave(status)

Parameters:
Name Type Description
status string
Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Attachment

updateSetting(event)

Parameters:
Name Type Description
event Object
Inherited From:
Source: