0

我有很多 Ext Direct 呼叫,结果到达后我需要显示一个消息框。

Direct.Class.Function (params, function (result) {
   // need to show message box in many ajax result like this

   //...
})

有什么解决办法吗?我可以以某种方式在唯一回调之前覆盖或进行默认回调吗?

4

1 回答 1

0

我找到了!:)

Ext.direct.Manager.on('message', function(e){
    Ext.Msg.show({
        title: "Message",
        msg: e.text, 
        buttons: Ext.Msg.OK, 
        icon: Ext.Msg.INFO, 
        fn: function (btn) { 
            location.href = e.url;
        },
        scope: this 
    });
});
于 2015-06-02T13:04:14.033 回答