开发者

How to change loadingText on a Panel with Sencha Touch?

I'm using setLoading(true) on a Panel, but cant find a way to change the "Loading..." text below the spinner.

I need at least to translate it to Norwegian.

app.views.ForfallDetaljerView = Ext.extend(Ext.Panel,{
    id: 'forfalldetaljer',
    scroll: 'vertical',
    dockedItems: [ new app.views.BackToolbar({
        title: 'Detaljer',
        buttonHandler: function(){
            Ext.dispatch({
开发者_如何学C                controller: app.controllers.forfallDetaljer,
                action: 'back',
            });
            // Clear view
            app.views.forfallDetaljer.update('');
        }
    })],
});

app.myview = new ForfallDetaljerView();
app.myview.setLoading(true);

Anyone got any idea?


app.myview = new ForfallDetaljerView();
var mask = new Ext.LoadMask(app.myview.el, {msg: "<text here>"});
mask.show();

You can then do a mask.hide() when you want to remove it.

You could also do something like:

var l = app.myview.setLoading(true);
l.el.down('div.x-loading-msg').setHTML("<text here>");

So hopefully these two options point you in the right direction.


There's another way to show the loading message:

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

Both Panel.setLoading(true) and Ext.LoadMask(...) return a LoadMask object. So it should work similarly.

http://dev.sencha.com/deploy/touch/docs/?class=Ext.LoadMask

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜