partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit ff004a9f4045427bba6cca494d0899c47ffb11f7
parent 55f29536f4513ab6f0ff7619bc504619383f1ab4
Author: Timo A. Hummel <felicitus@felicitus.org>
Date:   Fri,  6 Nov 2015 22:20:16 +0100

Destroy the unacknowledged notices check once logged out

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js b/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js @@ -100,10 +100,13 @@ Ext.application({ this.menuBar.enable(); this.doSystemStatusCheck(); - this.doUnacknowledgedNoticesCheck(); - /* Give the user preference stuff enough time to load */ - /* @todo Load user preferences directly on login and not via delayed task */ + this.unacknowledgedNoticesTask = Ext.TaskManager.start({ + run: this.doUnacknowledgedNoticesCheck, + scope: this, + interval: 100000 + }); + this.displayTipWindowTask = new Ext.util.DelayedTask(this.displayTipOfTheDayWindow, this); this.displayTipWindowTask.delay(100); @@ -119,6 +122,8 @@ Ext.application({ this.menuBar.disable(); this.centerPanel.removeAll(true); this.getStatusbar().setDisconnected(); + + Ext.TaskManager.stop(this.unacknowledgedNoticesTask); }, /** * Re-creates the part manager. This is usually called when the "compactLayout" configuration option has been @@ -240,8 +245,6 @@ Ext.application({ } else { this.statusBar.systemNoticeButton.hide(); } - - Ext.defer(this.doUnacknowledgedNoticesCheck, 100000, this); }, createGlobalStores: function () {