v1.18.x
psychobunny 11 years ago
parent 6fb596c1c6
commit a46006ba64

@ -307,10 +307,10 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) {
}
function updateTopicsGraph(topics) {
var tids = Object.keys(topics);
var segments = graphs.topics.segments;
var tids = Object.keys(topics),
segments = graphs.topics.segments;
function reassignExistingTopics() {
for (var i = 0, ii = segments.length; i < ii; i++ ) {
var tid = segments[i].tid;
@ -322,7 +322,9 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) {
delete topics[tid];
}
}
}
function assignNewTopics() {
while (segments.length < 10 && tids.length > 0) {
var tid = tids.pop(),
value = topics[tid],
@ -353,9 +355,17 @@ define('forum/admin/general/dashboard', ['semver'], function(semver) {
segments[segments.length - 1].tid = tid;
}
}
reassignExistingTopics();
assignNewTopics();
graphs.topics.update();
}
function buildTopicsLegend() {
}
return Admin;
});

Loading…
Cancel
Save