Browse Source

BIM元件庫左側沒顯示bug

nate 3 years ago
parent
commit
e01ea3e65b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      component-detail.php

+ 3 - 3
component-detail.php

@@ -217,12 +217,12 @@ include($_SERVER['DOCUMENT_ROOT'] . "/Authorization/script/php/permission/check_
 		for (var i = 0; i < jsonData.length; i++) {
 			for (var j = 0; j < jsonData[i].children.length; j++) {
 				$("a").each(function() {
-					if (jsonData[i].category_code == parent) {
-						if (jsonData[i].children[j].component_code == type) {
+					if (jsonData[i].category_name == parent) {
+						if (jsonData[i].children[j].component_name == type) {
 							var searchText = jsonData[i].children[j].component_name;
 							var found;
 
-							if ($(this).context.innerText == searchText && $(this).context.name == jsonData[i].category_code) {
+							if ($(this).context.innerText == searchText && $(this).context.name == jsonData[i].category_name) {
 								$(this).context.classList.add("highlight");
 								$(this).context.parentNode.parentNode.parentNode.classList.add("nav-expanded");
 							}