tweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-servicesmacoslinuxwindowsinboxwhatsappicloud
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
681 B
36 lines
681 B
Ext.define('Rambox.Application', { |
|
extend: 'Ext.app.Application' |
|
|
|
,name: 'Rambox' |
|
|
|
,stores: [ |
|
'ServicesList' |
|
,'Services' |
|
] |
|
|
|
,config: { |
|
totalServicesLoaded: 0 |
|
,totalNotifications: 0 |
|
} |
|
|
|
,launch: function () { |
|
// Add shortcuts to switch services using CTRL + Number |
|
var map = new Ext.util.KeyMap({ |
|
target: document |
|
,key: "0123456789" |
|
,ctrl: true |
|
,fn: function(key) { |
|
Ext.cq1('app-main').setActiveTab(key - 48); |
|
} |
|
}); |
|
} |
|
|
|
,updateTotalNotifications: function( newValue, oldValue ) { |
|
newValue = parseInt(newValue); |
|
if ( newValue > 0 ) { |
|
document.title = 'Rambox (' + newValue + ')'; |
|
} else { |
|
document.title = 'Rambox'; |
|
} |
|
} |
|
});
|
|
|