Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.4 KB

action_mask.rst

File metadata and controls

34 lines (22 loc) · 1.4 KB

Places a mask over an element, useful for blocking user interaction during lengthy postbacks.

Example:

<a id="{{ #fb_logon }}" href="#facebook"><img src="/lib/images/fb-login-button.png" width="154" height="22" alt="Facebook login button" /></a>
{% wire id=#fb_logon 
   action={mask target="logon_outer" message="Waiting for Facebook ."} 
   action={redirect dispatch="facebook_authorize"} %}

In this example the logon_outer div will be masked while the browser is being redirected to Facebook.

Form postbacks are automatically masked.

Note that you need to include a css and a js file to have working masks:

{% lib "css/jquery.loadmask.css" %}
{% lib "js/modules/jquery.loadmask.js" %}

This action takes three possible arguments:

Argument Description Example
target The id of the element to be masked. target="search-form"

message delay

Message to show next to the spinner image. Delay (in milliseconds) before the mask is shown. Only shows the mask during lengthy actions.

message="Searching..."

delay=200

action action-unmask, action-mask_progress