fix the formatting and change it so the events manager is started on the login event

This commit is contained in:
Damien Churchill 2010-01-23 15:38:07 +00:00
parent 42cbf4f5c6
commit 39341f623f
1 changed files with 42 additions and 35 deletions

View File

@ -42,6 +42,7 @@ Copyright:
Events = Ext.extend(Ext.util.Observable, { Events = Ext.extend(Ext.util.Observable, {
constructor: function() { constructor: function() {
this.toRegister = []; this.toRegister = [];
this.on('login', this.onLogin, this);
Events.superclass.constructor.call(this); Events.superclass.constructor.call(this);
}, },
@ -79,6 +80,12 @@ Copyright:
} }
}, },
onLogin: function() {
this.start();
this.on('PluginEnabledEvent', this.onPluginEnabled, this);
this.on('PluginDisabledEvent', this.onPluginDisabled, this);
},
onPollSuccess: function(events) { onPollSuccess: function(events) {
if (!events) return; if (!events) return;
Ext.each(events, function(event) { Ext.each(events, function(event) {