Extjs4 Image Upload Message

I created a small application with extjs4 using the MVC architecture. When a user first logs into the application, it takes 5-10 seconds to download. How to place a boot image that will inform the user about the need to wait until the application is initialized? (e.g. shencha, please wait for the image to load while the sample page loads)

thank

Tom

+3
source share
3 answers

To do this, I added a variable Ext.LoadMaskto my controller as follows:

var loginMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait ..."});

then before calling the function that calls the server side (using AJAX) for authentication, I call the show function as follows:

loginMask.show();

, :

loginMask.hide();

.

+3

Or you can use modal MessageBox to achieve the same:

        Ext.MessageBox.show({
            title: 'Please wait',
            msg: 'Loading...',
            progressText: 'Loading...',
            width:300,
            wait: true,
            waitConfig: {interval: 200},
            progress:true,
            closable:false,
            modal: true
    });

When done, just call the following:

Ext.MessageBox.hide(); 
0
source

All Articles