mario-h
9/30/2015 - 8:08 PM

[Precarga Ajax] Espera a que todo los Ajax Request finalicen, antes de proseguir con el código.Waits for all the Ajax request completed, bef

[Precarga Ajax] Espera a que todo los Ajax Request finalicen, antes de proseguir con el código.Waits for all the Ajax request completed, before you continue with the code. #ExtJs

showLoadingMask();
function showLoadingMask() {
    var loadText = 'Pre-Cargando... Por favor espere :'); //Mensaje que se Mostrara
    Ext.Ajax.on('beforerequest', function () {
        Ext.getBody().mask(loadText, 'Cargando');
    }, Ext.getBody());
    Ext.Ajax.on('requestcomplete', Ext.getBody().unmask, Ext.getBody());
    Ext.Ajax.on('requestexception', Ext.getBody().unmask, Ext.getBody());
}