Skip to content

Instantly share code, notes, and snippets.

View rattanchauhan's full-sized avatar
🎯
Focusing

Rattan Chauhan rattanchauhan

🎯
Focusing
View GitHub Profile
@rattanchauhan
rattanchauhan / app.js
Last active November 10, 2016 17:16
Adding a loading spinner at app startup in Sencha Architect
if(Ext.fly('initialLoader')){
Ext.fly('initialLoader').destroy();
}
@rattanchauhan
rattanchauhan / app.js
Last active November 6, 2016 12:45
Setting global default ajax timeout through Sencha Architect
Ext.data.proxy.Server.override ({
timeout: 300000
});
Ext.data.Connection.override({
withCredentials: false,
useDefaultXhrHeader: false,
disableCaching:false,
timeout: 300000
});
@rattanchauhan
rattanchauhan / app.js
Last active November 6, 2016 12:45
Adding global exception handler through Sencha Architect.
Ext.Ajax.on({
requestexception: function(dataconn, response, options) {
console.dir(dataconn);
console.dir(response);
console.dir(response.status);
if (response.status === 401) {
me.redirectTo('login');
}
}
});