Skip to main content

ensemble.Modal

ensemble#

ensemble~Modal โ‡ base#

ensemble.Modal component.

Kind: inner class of ensemble
Extends: base
Todo

  • arguments

new Modal([element], options)#

Constructor method.

ParamTypeDefaultDescription
[element]ElementA valid Element node to display in the modal dialog
optionsobjectOptions object
[options.ns]string"modal"The namespace for modal
[options.root]string"body"The root Element node
[options.className]string | Array.<string>"modal"The component CSS class name
[options.fx]booleantrueSwitch for allow effects
[options.windowed]booleanfalseSwitch for framing in a window
[options.cloning]booleantrueAllow cloning of passed element(s)
[options.backClose]booleantrueSwitch for closing on tap/click outside the content
[options.keyboard]booleantrueSwitch for keyboard navigation
[options.close]objectCustom parameters for close button
[options.onOpen]functiononOpen callback, fires when open modal
[options.onClose]functiononOpen callback, fires when close modal
[options.onShow]functiononShow callback, fires when show modal, after it openes
[options.onHide]functiononHide callback, fires when hide modal, before it closes
[options.onContent]functiononContent callback, fires when a content will be shown

Example

var modal = new ensemble.Modal(document.getElementById('inline-content-to-display'), {});
modal.open();
modal.close();

modal._defaults() โ‡’ object#

Options object default properties.

Kind: instance method of Modal

modal._bindings()#

Methods binding.

Kind: instance method of Modal

modal.generator()#

The generator creates the container box with almost everything the component needs.

Kind: instance method of Modal
Todo

  • TODO

modal.populate(target)#

In this stage the component is populated with all the content progeny.

Kind: instance method of Modal
Todo

  • TODO
ParamTypeDescription
targetElementThe element that is invoking

modal.resume(target)#

Processing when the component is resumed.

Kind: instance method of Modal
Todo

  • TODO
ParamTypeDescription
targetElementThe element that is invoking

modal.content(node, clone) โ‡’ Element#

The single content.

Kind: instance method of Modal
Returns: Element - wrap - The wrapped (cloned) Element node
Todo

  • TODO
ParamTypeDescription
nodeElementA valid Element node
clonebooleanEventually clones Element nodes

modal.destroy()#

Kind: instance method of Modal
Todo

  • TODO

modal.open(e, target)#

Opens the modal.

Kind: instance method of Modal

ParamTypeDescription
eEventAn Event
targetElementThe element that is invoking

modal.close(e, target)#

Closes the modal.

Kind: instance method of Modal

ParamTypeDescription
eEventAn Event
targetElementThe element that is invoking

modal.show(target)#

Shows the modal.

Kind: instance method of Modal

ParamTypeDescription
targetElementThe element that is invoking

modal.hide(target)#

Hides the modal.

Kind: instance method of Modal

ParamTypeDescription
targetElementThe element that is invoking

modal.backx(e)#

Handles the close on tap/click outside the content.

Kind: instance method of Modal
Todo

  • test
ParamTypeDescription
eEventAn Event

modal.keyboard(e)#

Captures keyboard codes corresponding to functions to be triggered.

Kind: instance method of Modal

ParamTypeDescription
eEventAn Event