Tuesday, August 7, 2012

Loading mask using AUI/alloy UI

//to Enable the Loading mask write this code in starting of your task
AUI().use( 'aui-loading-mask', function(A){
                         if (A.one('#tagid').loadingmask == null)
                        A.one('#tagid').plug(A.LoadingMask, { background: '#000' });
                            A.one('#tagid').loadingmask.toggle();
                });

//to Disable the loading mask once again call the toggle(); , write this after compleation of your task

AUI().use( 'aui-loading-mask', function(A){
            A.one('#tagid').loadingmask.toggle();
      });

Note : Here #tagid is id of the tag where you want to display loading mask

4 comments:

Martin said...

Cool, finally a working example of adding a loading mask to a node! Thanks, this made my hour!

Inthiyaz Shaik said...

Welcome bro

Asif said...

How can I dynamically change the loading string which we configure as

strings: {
loading: "Hello World"
}

I want to change it dynamically from javascript code.nstrmu

Inthiyaz Shaik said...

Hi Asif,

In the above code the loading String which you are getting is Gif default image given by Liferay. you can use your own image for that rather than using default image

Liferay DXP JNDI Data Source Cofiguration

 This Blog will help us to learn about the JNDI Data Source Configuration in Liferay DXP. We have tested this with Liferay 7.3 with Tomcat. ...