Improved the tree controller

This commit is contained in:
Alejandro Gallardo Escobar 2014-12-19 13:02:30 +01:00
parent 968256f6e2
commit 2f90ad85a4
1 changed files with 3 additions and 2 deletions

View File

@ -81,12 +81,13 @@ TreeController = {
case 'group':
if (typeof element.icon != 'undefined' && element.icon.length > 0) {
$content.append('<img src="'+(controller.baseURL.length > 0 ? controller.baseURL : '')
+'images/groups_small/'+element.icon+'.png" />')
+'images/groups_small/'+element.icon+'" />')
}
$content.append(element.name);
break;
case 'agent':
$content.append(element.name);
break;
case 'module':
$content.append(element.name);
break;
@ -96,7 +97,7 @@ TreeController = {
}
// Load the status counters
if (typeof element.counters != 'undefined' && element.counters.length > 0) {
if (typeof element.counters != 'undefined') {
var $counters = $("<div></div>");
$counters.addClass('tree-node-counters');