瀏覽代碼

Set gray color to disabled skills in skill wheel

José Loguercio 8 年之前
父節點
當前提交
c1b15239ac
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 3 1
      main/inc/lib/skill.lib.php
  2. 5 0
      main/template/default/skill/skill_wheel.js.tpl

+ 3 - 1
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)
     {

+ 5 - 0
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