From c1b15239ac1bac714638aa006bb3271e0b2f071f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Loguercio?= Date: Mon, 1 Aug 2016 09:00:51 -0500 Subject: [PATCH] Set gray color to disabled skills in skill wheel --- main/inc/lib/skill.lib.php | 4 +++- main/template/default/skill/skill_wheel.js.tpl | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/skill.lib.php b/main/inc/lib/skill.lib.php index 776fd4a84f..2bfaf313fc 100755 --- a/main/inc/lib/skill.lib.php +++ b/main/inc/lib/skill.lib.php @@ -1002,6 +1002,8 @@ class Skill extends Model $skill['data']['name'] = $skill['name']; + $skill['data']['status'] = $skill['status']; + // In order to paint all members of a family with the same color if (empty($skill_id)) { if ($skill['parent_id'] == 1) { @@ -1089,7 +1091,7 @@ class Skill extends Model * @param int skill id * @param bool return a flat array or not * @param int depth of the skills - * + * @return json */ public function get_skills_tree_json($user_id = null, $skill_id = null, $return_flat_array = false, $main_depth = 2) { diff --git a/main/template/default/skill/skill_wheel.js.tpl b/main/template/default/skill/skill_wheel.js.tpl index 8e6a12f9c7..17c3feb4cb 100755 --- a/main/template/default/skill/skill_wheel.js.tpl +++ b/main/template/default/skill/skill_wheel.js.tpl @@ -262,6 +262,11 @@ function set_skill_style(d, attribute, searched_skill_id) { return_fill = '#A1D99B'; } + // 5. Grey / Black if the skill is disabled + if (d.status < 1) { + return_fill = '#48616C'; + } + switch (attribute) { case 'fill': //In order to identify the color of the text (white, black) used in other function