Results 1 to 2 of 2

Thread: Ext.LoadMask configs are not applied

  1. #1
    Sencha User
    Join Date
    May 2014
    Posts
    18
    Answers
    1

    Default Answered: Ext.LoadMask configs are not applied

    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:

    Code:
      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();
      });

  2. Try creating a CSS class like this:

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

    And change your function to:

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

  3. #2
    Sencha Premium Member glopes's Avatar
    Join Date
    Jan 2013
    Location
    Chicago
    Posts
    123
    Answers
    16

    Default

    Try creating a CSS class like this:

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

    And change your function to:

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •