Expand all

Permission

A box to display additional terms or remarks from the image author. (Typically comes from the Permission field of the {{Information}} template.) It has two states: when closed, it just shows some text, when open, it shows the HTML block supplied by the author in its full beauty.

Constructor

new Permission($container, scroller) #

Parameters:

Name Type Description
$container jQuery
scroller MetadataPanelScroller
Source:

Properties

$box #

Contains everything else.

Properties:

Type Description
jQuery
Source:
Contains everything else.

$close #

"Close" button (does not actually close the box, just makes it smaller).

Properties:

Type Description
jQuery
Source:
"Close" button (does not actually close the box, just makes it smaller).

$fader #

A helper element to fade off text

Properties:

Type Description
jQuery
Source:
A helper element to fade off text

$html #

Original (HTML) version of the author's message This can be scary sometimes (huge tables, black text on dark purple background etc).

Properties:

Type Description
jQuery
Source:

Original (HTML) version of the author's message This can be scary sometimes (huge tables, black text on dark purple background etc).

$text #

Plain-text version of the author's message This is just the text parsed out from the original markup, it might not make much sense (e.g. if the original is a HTML table)

Properties:

Type Description
jQuery
Source:

Plain-text version of the author's message This is just the text parsed out from the original markup, it might not make much sense (e.g.

$title #

Box title

Properties:

Type Description
jQuery
Source:
Box title

scroller #

Panel scroller from the metadata panel object.

Properties:

Type Description
MetadataPanelScroller
Source:
Panel scroller from the metadata panel object.

Methods

empty() #

Clear everything

Source:
Clear everything

grow() #

Enlarge the box, show HTML instead of text.

Fires:

Source:
Enlarge the box, show HTML instead of text.

isFullSize() → {boolean} #

Returns whether the box is full-size.

Returns:

Type
boolean
Source:
Returns whether the box is full-size.

set(permission) #

Set permission text/html

Parameters:

Name Type Description
permission string

the text or HTML code written by the image author

Source:
Set permission text/html

shrink() #

Limit the size of the box, show text only.

Fires:

Source:
Limit the size of the box, show text only.

Events

mmv-permission-grow() #

mmv-permission-shrink() #