Class: Attachment

wp.media.view. Attachment


new Attachment()

wp.media.view.Attachment
Source:

Extends

Classes

Details
EditLibrary
EditSelection
Library
Selection

Methods


_syncAlbum(model, value)

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

_syncArtist(model, value)

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

_syncCaption(model, value)

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

_syncTitle(model, value)

Parameters:
Name Type Description
model Backbone.Model
value string
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
Source:
Returns:

deselect(model, collection)

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

details(model, collection)

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

dispose()

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

imageSize(size)

Parameters:
Name Type Description
size string
Source:
Returns:
Type
Object

remove()

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

removeFromLibrary(event)

Parameters:
Name Type Description
event Object
Source:

render()

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

select(model, collection)

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

selected()

Source:
Returns:
Type
unresolved | Boolean

toggleSelection(options)

Parameters:
Name Type Description
options Object
Source:

toggleSelectionHandler(event)

Parameters:
Name Type Description
event Object
Source:

updateSave(status)

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

updateSetting(event)

Parameters:
Name Type Description
event Object
Source: