Alloy UI

aui-loading-mask  1.0.1

 
Filters

Class LoadingMask - extends Plugin.Base

A base class for LoadingMask, providing:
  • Cross browser mask functionality to cover an element or the entire page
  • Customizable mask (i.e., background, opacity)
  • Display a centered "loading" message on the masked node
Quick Example:
node.plug(A.LoadingMask, { background: '#000' });
Check the list of Configuration Attributes available for LoadingMask.

Constructor

LoadingMask ( config )
Parameters:
config <Object> Object literal specifying widget configuration properties.

Properties

LoadingMask.ATTRS - static Object

Static property used to define the default attribute configuration for the LoadingMask.

LoadingMask.NAME - static String

Static property provides a string to identify the class.

LoadingMask.NS - static String

Static property provides a string to identify the namespace.

overlayMask - protected OverlayMask

Stores the OverlayMask used internally.

Properties inherited from Attribute:

Properties inherited from Base:

Properties inherited from Plugin.Base:

Configuration Attributes

messageEl - String

Node element to display the message.
Default Value: Generated HTML div element.

strings - Object

Strings used on the LoadingMask. See strings.
Default Value: { loading: 'Loading…' }

target - Node | Widget

Node where the mask will be positioned and re-dimensioned.
Default Value: null

Configuration attributes inherited from Base:

Configuration attributes inherited from Plugin.Base:

Methods

_afterVisibleChange

protected void _afterVisibleChange ( event )
Fires after the value of the visible attribute change.
Parameters:
event <EventFacade>

_bindOverlayMaskUI

protected void _bindOverlayMaskUI ( )
Bind events to the overlayMask.

_createDynamicAttrs

protected void _createDynamicAttrs ( config )
Create dynamic attributes listeners to invoke the setter on overlayMask after the attribute is set on the LoadingMask instance.
Parameters:
config <Object> Object literal specifying widget configuration properties.

_renderOverlayMask

protected void _renderOverlayMask ( )
Render overlayMask instance.

bindUI

protected void bindUI ( )
Bind the events on the LoadingMask UI. Lifecycle.

centerMessage

void centerMessage ( )
Center the messageEl with the target node.

hide

void hide ( )
Invoke the overlayMask hide method.

initializer

protected void initializer ( )
Construction logic executed during LoadingMask instantiation. Lifecycle.

refreshMask

void refreshMask ( )
Invoke the overlayMask refreshMask method.

renderUI

protected void renderUI ( )
Create the DOM structure for the LoadingMask. Lifecycle.

show

void show ( )
Invoke the overlayMask show method.

toggle

void toggle ( )
Invoke the overlayMask toggle method.

Events

messageElChange

messageElChange ( event )
Fires when the value for the configuration attribute 'messageEl' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

stringsChange

stringsChange ( event )
Fires when the value for the configuration attribute 'strings' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

targetChange

targetChange ( event )
Fires when the value for the configuration attribute 'target' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Events inherited from Base:

Events inherited from Plugin.Base: