From 950ca956a3b20f4edba426ed90ce00521081f14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 19 Jul 2021 11:17:36 +0200 Subject: [PATCH 1/2] Fixed issues with subgroups in Tree view --- .../include/javascript/tree/TreeController.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index ee8aea67de..8e6e145d58 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -962,7 +962,7 @@ var TreeController = { } // If exist the detail container, show the data if ( - typeof controller.detailRecipient !== "undefined" && + typeof controller.detailRecipient !== "undefined" || disabled == false ) { if (element.type == "agent" || element.type == "module") { @@ -997,8 +997,8 @@ var TreeController = { $node.addClass("leaf-empty"); if ( - typeof element.children != "undefined" && - element.children.length > 0 && + (typeof element.children != "undefined" && + element.children.length > 0) || element.disabled == false ) { $node.removeClass("leaf-empty").addClass("leaf-closed"); @@ -1032,13 +1032,13 @@ var TreeController = { } if ( - typeof element.searchChildren != "undefined" && - element.searchChildren + (typeof element.searchChildren != "undefined" && + element.searchChildren) || + element.disabled == true ) { if ( - (element.rootType == "group_edition" && - typeof element.children == "undefined") || - element.disabled == true + element.rootType == "group_edition" && + typeof element.children == "undefined" ) { $node.addClass("leaf-empty"); } else { From 8968d6abb967543d57ec8610266b4fb93540b363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Gonz=C3=A1lez?= Date: Mon, 19 Jul 2021 18:04:25 +0200 Subject: [PATCH 2/2] Fixed leafs for modules --- pandora_console/include/javascript/tree/TreeController.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandora_console/include/javascript/tree/TreeController.js b/pandora_console/include/javascript/tree/TreeController.js index 8e6e145d58..898f389891 100644 --- a/pandora_console/include/javascript/tree/TreeController.js +++ b/pandora_console/include/javascript/tree/TreeController.js @@ -1001,8 +1001,6 @@ var TreeController = { element.children.length > 0) || element.disabled == false ) { - $node.removeClass("leaf-empty").addClass("leaf-closed"); - // Add children var $children = _processGroup($node, element.children); $node.data("children", $children);