Skip to content

Commit

Permalink
Show always the skill name like a tooltip on skill wheel - refs BT#10175
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Aug 25, 2015
1 parent 5d2cd94 commit 87af6dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/inc/lib/skill.lib.php
Expand Up @@ -984,9 +984,11 @@ public function get_skills_tree($user_id = null, $skill_id = null, $return_flat_
!empty($skill['short_code']) &&
api_get_setting('show_full_skill_name_on_skill_wheel') === 'false'
) {
$skill['data']['name'] = $skill['short_code'];
$skill['data']['short_code'] = $skill['short_code'];
}

$skill['data']['name'] = $skill['name'];

// In order to paint all members of a family with the same color
if (empty($skill_id)) {
if ($skill['parent_id'] == 1) {
Expand Down
8 changes: 8 additions & 0 deletions main/template/default/skill/skill_wheel.js.tpl
Expand Up @@ -600,6 +600,10 @@ function load_nodes(load_skill_id, main_depth, extra_parent_id) {
textEnter.append("tspan")
.attr("x", 0)
.text(function(d) {
if (d.short_code) {
return d.short_code;
}
if (d.depth && d.name) {
var nameParts = d.name.split(' ');
Expand All @@ -617,6 +621,10 @@ function load_nodes(load_skill_id, main_depth, extra_parent_id) {
.attr("x", 0)
.attr("dy", "1em")
.text(function(d) {
if (d.short_code) {
return null;
}
if (d.depth && d.name) {
var nameParts = d.name.split(' ');
Expand Down

0 comments on commit 87af6dc

Please sign in to comment.