ensemble.Modal
#
ensemblebase
#
ensemble~Modal โ ensemble.Modal component.
Kind: inner class of ensemble
Extends: base
Todo
- arguments
- ~Modal โ
base
#
new Modal([element], options)Constructor method.
Param | Type | Default | Description |
---|---|---|---|
[element] | Element | A valid Element node to display in the modal dialog | |
options | object | Options 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] | boolean | true | Switch for allow effects |
[options.windowed] | boolean | false | Switch for framing in a window |
[options.cloning] | boolean | true | Allow cloning of passed element(s) |
[options.backClose] | boolean | true | Switch for closing on tap/click outside the content |
[options.keyboard] | boolean | true | Switch for keyboard navigation |
[options.close] | object | Custom parameters for close button | |
[options.onOpen] | function | onOpen callback, fires when open modal | |
[options.onClose] | function | onOpen callback, fires when close modal | |
[options.onShow] | function | onShow callback, fires when show modal, after it openes | |
[options.onHide] | function | onHide callback, fires when hide modal, before it closes | |
[options.onContent] | function | onContent callback, fires when a content will be shown |
Example
object
#
modal._defaults() โ 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
Param | Type | Description |
---|---|---|
target | Element | The element that is invoking |
#
modal.resume(target)Processing when the component is resumed.
Kind: instance method of Modal
Todo
- TODO
Param | Type | Description |
---|---|---|
target | Element | The element that is invoking |
Element
#
modal.content(node, clone) โ The single content.
Kind: instance method of Modal
Returns: Element
- wrap - The wrapped (cloned) Element node
Todo
- TODO
Param | Type | Description |
---|---|---|
node | Element | A valid Element node |
clone | boolean | Eventually clones Element nodes |
#
modal.destroy()Kind: instance method of Modal
Todo
- TODO
#
modal.open(e, target)Opens the modal.
Kind: instance method of Modal
Param | Type | Description |
---|---|---|
e | Event | An Event |
target | Element | The element that is invoking |
#
modal.close(e, target)Closes the modal.
Kind: instance method of Modal
Param | Type | Description |
---|---|---|
e | Event | An Event |
target | Element | The element that is invoking |
#
modal.show(target)Shows the modal.
Kind: instance method of Modal
Param | Type | Description |
---|---|---|
target | Element | The element that is invoking |
#
modal.hide(target)Hides the modal.
Kind: instance method of Modal
Param | Type | Description |
---|---|---|
target | Element | The element that is invoking |
#
modal.backx(e)Handles the close on tap/click outside the content.
Kind: instance method of Modal
Todo
- test
Param | Type | Description |
---|---|---|
e | Event | An Event |
#
modal.keyboard(e)Captures keyboard codes corresponding to functions to be triggered.
Kind: instance method of Modal
Param | Type | Description |
---|---|---|
e | Event | An Event |