From 988991facec232698ff2bee13957b7eafcf37528 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Tue, 19 Jul 2016 17:18:44 +0200 Subject: [PATCH] Feature #4657: Display colors for the labels --- src/sunstone/public/app/utils/labels/tree.js | 36 ++++++++++++++++++-- src/sunstone/public/scss/_labels.scss | 5 ++- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/sunstone/public/app/utils/labels/tree.js b/src/sunstone/public/app/utils/labels/tree.js index a6d2c168d1..b188dba8ae 100644 --- a/src/sunstone/public/app/utils/labels/tree.js +++ b/src/sunstone/public/app/utils/labels/tree.js @@ -54,12 +54,21 @@ define(function(require) { } function _innerHtml(tree, collapsed){ - var html = '
  • '; + var html = ""; if (collapsed) { if (tree.subTree.length > 0) { - html += ' '; + html = '
  • '; } else { + var title = $(tree.htmlStr).attr('title'); + var color = _labelHue(title); + + if (title != undefined && title != "") { + html = '
  • '; + } else { + html = '
  • '; + } + html += ' '; } @@ -70,8 +79,17 @@ define(function(require) { html += '