Class: UWA.Controls.Overlay

UWA/Controls/Overlay. UWA.Controls.Overlay

new UWA.Controls.Overlay(options)

The Overlay control is designed to create modal with custom content inside that fade when you close it.

Available Events
Event Description
onPreOpen Triggered when the container is about to be opened
onOpen Triggered when the container is fully visible
onPreClose Triggered when the container is about to be closed
onClose riggered when the container is fully hidden
Example
var myOverlay = new UWA.Controls.Overlay();

myOverlay.inject(widget.body);
myOverlay.open();
Parameters
Name Type Description
options Object

Options hash or a option/value pair.

Properties
Name Type Argument Default Description
exclusive Boolean <optional>
true

Close the other overlays before opening itself

exclusiveWith Function <optional>

Customized check to see if another modal should be exclusive with this one. The function will be called with another modal as argument, and if it returns true, the other modal will be claused. By default, name properties are compared.

closeable Boolean <optional>
true

Close the overlay by clicking on it

fxOptions Object <optional>
{}

Custom fx options for open / close

resizeParent Boolean <optional>
false

Resize the first positionned parent element with the same height of the content if necessary.

Extends

  • UWA.Controls.Abstract

Index

Members

name :String

Class name assigned to the parent element of the control.

Type
  • String

Methods

closeOverlays(cb)

Close all overlays present in any level of the parent element of this overlay.

Parameters
Name Type Argument Description
cb Function <optional>

called when all overlays are closed

onFxComplete()

Triggered when the fx is complete.

isOpen() → {Boolean}

Check the state of this overlay.

Returns

true if the overlay is open.

Type
Boolean

open() → {this}

Open the overlay.

Returns
Type
this

close() → {this}

Close the overlay.

Returns
Type
this

toggle(y) → {this}

Toggle the overlay.

Parameters
Name Type Argument Description
y Boolean <optional>

Force the overlay to open or close

Returns
Type
this

resize(reset)

Resize the first positionned parent element with the same height of the content if necessary.

Parameters
Name Type Description
reset Boolean

true to reset parent to its initial height