Expand all

OptionsDialog

Represents the viewing options dialog and the link to open it.

Constructor

new OptionsDialog($container, $openButton, config) #

Parameters:

Name Type Description
$container jQuery

the element to which the dialog will be appended

$openButton jQuery

the button which opens the dialog. Only used for positioning.

config Config
Source:

Methods

Adds the info link to the panel.

addText($container, msgs) #

Adds text to a dialog.

Parameters:

Name Type Description
$container jQuery
msgs Array.<string>

The messages to be added.

Source:
Adds text to a dialog.

closeDialog([e]) #

Closes the options dialog.

Parameters:

Name Type Attributes Description
e Event optional

Event object when the close action is caused by a user action, as opposed to closing the window or something.

Source:
Closes the options dialog.

createActionPane(divClass, propName, smsg, msgs, enabled) #

Creates an action pane.

Parameters:

Name Type Description
divClass string

Class applied to main div.

propName string

Name of the property on this object to which we'll assign the div.

smsg string

Message for the submit button.

msgs string

See #addText

enabled boolean

Whether this dialog is an enable one.

Source:
Creates an action pane.

createConfirmationPane(divClass, propName, msgs) #

Creates a confirmation pane.

Parameters:

Name Type Description
divClass string

Class applied to main div.

propName string

Name of the property on this object to which we'll assign the div.

msgs string

See #addText

Source:
Creates a confirmation pane.

hideDivs() #

Hides all of the divs.

Source:
Hides all of the divs.

initDisableConfirmation() #

Initialises the disable confirmation pane.

Source:
Initialises the disable confirmation pane.

initDisableDiv() #

Initialises the disable action pane.

Source:
Initialises the disable action pane.

initEnableConfirmation() #

Initialises the enable confirmation pane.

Source:
Initialises the enable confirmation pane.

initEnableDiv() #

Initialises the enable action pane.

Source:
Initialises the enable action pane.

initPanel() #

Initialises UI elements.

Source:
Initialises UI elements.

makeButtons($container, smsg, enabled) #

Creates buttons for the dialog.

Parameters:

Name Type Description
$container jQuery
smsg string

Message for the submit button.

enabled boolean

Whether the viewer is enabled after this dialog is submitted.

Source:
Creates buttons for the dialog.

makeCancelButton($submitDiv) → {jQuery} #

Makes a cancel button for one of the panels.

Parameters:

Name Type Description
$submitDiv jQuery

The div for the buttons in the dialog.

Source:

Returns:

Cancel button

Type
jQuery
Makes a cancel button for one of the panels.

makeSubmitButton($submitDiv, msg, enabled) → {jQuery} #

Makes a submit button for one of the panels.

Parameters:

Name Type Description
$submitDiv jQuery

The div for the buttons in the dialog.

msg string

The string to put in the button.

enabled boolean

Whether to turn the viewer on or off when this button is pressed.

Source:

Returns:

Submit button

Type
jQuery
Makes a submit button for one of the panels.

openDialog() #

Opens a dialog with information about file reuse.

Source:
Opens a dialog with information about file reuse.

showDisableConfirmation() #

Shows the confirmation div for the disable action.

Source:
Shows the confirmation div for the disable action.

showEnableConfirmation() #

Shows the confirmation div for the enable action.

Source:
Shows the confirmation div for the enable action.

Events

mmv-options-closed() #

Fired when the dialog is closed.

Source:
Fired when the dialog is closed.

mmv-options-opened() #

Fired when the dialog is opened.

Source:
Fired when the dialog is opened.