@ -150,6 +149,7 @@ bright green for skills looked for by a HR director ("Profile search" view)
dark green for skills most searched for, summed up from the different saved searches from HR directors ("Most wanted skills")
bright red for missing skills, in the "Required skills" view for a student when looking at the "Most wanted skills" (or later, when we will have developed that, for the "Matching position" view)
*/
var userSkills;
/**
Manage the partition background colors
@ -177,9 +177,20 @@ function set_skill_style(d, attribute, searched_skill_id) {
return_fill = '#B94A48';
}
if (!userSkills) {
$.ajax({
url: url + '&a=get_all_user_skills',
async: false,
success: function (skills) {
userSkills = jQuery.parseJSON(skills);
}
});
}
// Old way (it makes a lot of ajax calls)
//4. Blue - if user achieved that skill
//var skill = false;
$.ajax({
/*$.ajax({
url: url+'&a=get_user_skill&profile_id='+d.id,
async: false,
success: function(skill) {
@ -187,7 +198,13 @@ function set_skill_style(d, attribute, searched_skill_id) {
return_fill = '#3A87AD';
}
}
});
});*/
// New way (Only 1 ajax call)
// 4. Blue - if user achieved that skill
if (userSkills[d.id]) {
return_fill = '#3A87AD';
}
switch (attribute) {
case 'fill':
@ -225,7 +242,6 @@ function click_partition(d, path, text, icon, arc, x, y, r, p, vis) {