0

Is there a way to change Ext.LoadMask.msg on ExtJS 4.1 MVC Application globally?

sra
  • 23,820
  • 7
  • 55
  • 89
s.webbandit
  • 16,332
  • 16
  • 58
  • 82
  • http://www.sencha.com/forum/showthread.php?145538-Override-default-loading-mask-msg – MMT Aug 31 '12 at 10:03

4 Answers4

1

It should work with

// changing the msg text below will affect the LoadMask
Ext.define("Ext.locale.##.view.AbstractView", {
    override: "Ext.view.AbstractView",
    msg: "Loading data..."
});

for the most cases. Call this right after/within the onReady() function. Set ## to your locale language

sra
  • 23,820
  • 7
  • 55
  • 89
1
Ext.define("Ext.locale.de.view.AbstractView", {
override: "Ext.view.AbstractView",
loadingText: "Uebertrage Daten..." });

This works for me.

0

Add something like this at the onReady function:

if (Ext.LoadMask) {
    Ext.apply(Ext.LoadMask.prototype, {
        msg: 'Загрузка...'
    });
}

Or like this at the your locale.** file:

Ext.define("Ext.locale.**.LoadMask", {
    override: "Ext.LoadMask",
    msg: "Загрузка..."
});
athspk
  • 6,722
  • 7
  • 37
  • 51
Grusho
  • 1
-1
var myMask = new Ext.LoadMask(myPanel, {msg:"Please wait..."});
myMask.show();

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.LoadMask

AJJ
  • 3,570
  • 7
  • 43
  • 76
  • this one applies `LoadMask` to certain Component only. In your case - `myPanel`. I'm searching for global solution for whole Application. – s.webbandit Aug 31 '12 at 09:43
  • Use Ext.getBody() to get your entire window. Call this at appropriate place in your code. and pass the value to LoadMask() – AJJ Aug 31 '12 at 09:54
  • I have lots of `LoadMask`s in my App. I should call this method for every mask I have? – s.webbandit Aug 31 '12 at 10:20
  • That is the only way i think.. If you need to change the message at single sort then i feel u need to override the LoadMask method. But the better way is create a function like mask: function(body, msg) { new Ext.LoadMask(body, msg)} and call this function wherever needed. – AJJ Aug 31 '12 at 10:25