From bd6d44aeaa52e425e496377a294051af9bde2098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 9 Mar 2016 21:36:20 +0200 Subject: [PATCH] closes #4327 --- public/src/admin/general/dashboard.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/public/src/admin/general/dashboard.js b/public/src/admin/general/dashboard.js index 553503e700..6fa7084319 100644 --- a/public/src/admin/general/dashboard.js +++ b/public/src/admin/general/dashboard.js @@ -22,7 +22,17 @@ define('admin/general/dashboard', ['semver'], function(semver) { graphInterval: 15000, realtimeInterval: 1500 }; + + $(window).on('action:ajaxify.start', function(ev, data) { + clearInterval(intervals.rooms); + clearInterval(intervals.graphs); + intervals.rooms = null; + intervals.graphs = null; + graphData.rooms = null; + graphData.traffic = null; + usedTopicColors.length = 0; + }); Admin.init = function() { app.enterRoom('admin'); @@ -30,17 +40,6 @@ define('admin/general/dashboard', ['semver'], function(semver) { isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); - $(window).on('action:ajaxify.start', function(ev, data) { - clearInterval(intervals.rooms); - clearInterval(intervals.graphs); - - intervals.rooms = null; - intervals.graphs = null; - graphData.rooms = null; - graphData.traffic = null; - usedTopicColors.length = 0; - }); - $.get('https://api.github.com/repos/NodeBB/NodeBB/tags', function(releases) { // Re-sort the releases, as they do not follow Semver (wrt pre-releases) releases = releases.sort(function(a, b) {