PDA

View Full Version : Ext.LoadMask configs are not applied



burton449
20 Jun 2014, 10:00 AM
I want to modify the style of the element of a LoadMask, but configs such "style" or "maskCls" are not applied.

My goal is to render the mask message not in the center of the component, but in one corner.

I am using the LoadMask for ajax request like this:


Ext.Ajax.on("beforerequest", function(){
myMask = new Ext.LoadMask(Ext.getBody(), {msg:"Please wait...", style:{ left: "0", bottom: "0" } });
myMask.show();
});

Ext.Ajax.on("requestcomplete", function(){
myMask.hide();
});

glopes
20 Jun 2014, 12:32 PM
Try creating a CSS class like this:



.myLoader {
left : 0px !important;
top: initial !important;
bottom : 0px !important;
}



And change your function to:



Ext.Ajax.on("beforerequest", function(){
Ext.getBody().mask('Please wait...', 'myLoader');
});

Ext.Ajax.on("requestcomplete", function(){
Ext.getBody().unmask();
});