Expand all

DownloadPane

UI component that provides functionality to download the media asset displayed.

Constructor

new DownloadPane($container) #

Parameters:

Name Type Description
$container jQuery
Source:

Properties

image #

Properties:

Name Type Description
Image ImageModel | null

the download button currently points to.

Source:

Methods

attach() #

Registers listeners.

Source:
Registers listeners.

createDownloadButton($container) #

Creates download split button. It is a link with the "download" property set plus an arrow that allows the user to select the image size desired. The "download" property triggers native browser downloading in browsers that support it. The fallback is the 'download' parameter which instructs the server to send the right headers so the browser downloads the file instead of just displaying it. If all this fails, the image will appear in another window/tab.

Parameters:

Name Type Description
$container jQuery
Source:
Creates download split button.

createDownloadSection($container) #

Creates dialog download section.

Parameters:

Name Type Description
$container jQuery
Source:
Creates dialog download section.
Creates preview link.

createSizePulldownMenu($container) #

Creates pulldown menu to select image sizes.

Parameters:

Name Type Description
$container jQuery
Source:
Creates pulldown menu to select image sizes.

getExtensionFromUrl(url) → {string} #

Chops off the extension part of an URL.

Parameters:

Name Type Description
url string

URL

Source:

Returns:

Extension

Type
string
Chops off the extension part of an URL.

handleSizeSwitch() #

Handles size menu change events.

Source:
Handles size menu change events.

selectAttribution([name]) #

Selects the specified attribution type.

Parameters:

Name Type Attributes Default Description
name string optional
'plain'

The attribution type to use ('plain' or 'html')

Source:
Selects the specified attribution type.

set(image) #

Sets the data on the element.

Parameters:

Name Type Description
image ImageModel
Source:
Sets the data on the element.

setAttributionText(imageInfo) #

Sets the text in the attribution input element.

Parameters:

Name Type Description
imageInfo ImageModel
Source:
Sets the text in the attribution input element.

setDownloadUrl(url) #

Sets the URL on the download button.

Parameters:

Name Type Description
url string
Source:
Sets the URL on the download button.

unattach() #

Clears listeners.

Source:
Clears listeners.