From d7bf50b45bb70cb3f24101498bef631a03d7bf78 Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 19 Jul 2013 10:09:21 +0000 Subject: [PATCH] fix #896 (Manage Users: Status bar says '0 robots' when 'Include Robots' is not checked) --- static/js/usersDialog.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/static/js/usersDialog.js b/static/js/usersDialog.js index 6673bb08f..e54f0d634 100644 --- a/static/js/usersDialog.js +++ b/static/js/usersDialog.js @@ -379,10 +379,14 @@ pandora.ui.usersDialog = function() { $guestsCheckbox.value() ? ' (' + Ox.formatNumber(data.users) + ' registered, ' + Ox.formatNumber(data.guests) + ' guest' - + (data.guests == 1 ? '' : 's') + ', ' - + Ox.formatNumber(data.robots) + ' robot' - + (data.robots == 1 ? '' : 's') - + ')' + + (data.guests == 1 ? '' : 's') + + ( + $robotsCheckbox.value() + ? ', ' + + Ox.formatNumber(data.robots) + ' robot' + + (data.robots == 1 ? '' : 's') + : '' + ) + ')' : '' ) );