Skip to content

Commit c56af50

Browse files
committed
ACP2E-3350: Disabled Categories are no longer have their names grayed out in the category tree
1 parent 89892f2 commit c56af50

File tree

3 files changed

+4
-8
lines changed
  • app/code/Magento/Catalog
  • dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category

3 files changed

+4
-8
lines changed

app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,7 @@ protected function _getNodeJson($node, $level = 0)
392392
$item['id'] = $node->getId();
393393
$item['store'] = (int)$this->getStore()->getId();
394394
$item['path'] = $node->getData('path');
395-
if (!$node->getIsActive()) {
396-
$item['a_attr'] = ['class' => 'disabled-category'];
397-
}
398-
$item['cls'] = 'folder ' . ($node->getIsActive() ? 'active-category' : 'no-active-category');
395+
$item['li_attr'] = ['class' => $node->getIsActive() ? 'active-category' : 'no-active-category'];
399396
//$item['allowDrop'] = ($level<3) ? true : false;
400397
$allowMove = $this->_isCategoryMoveable($node);
401398
$item['allowDrop'] = $allowMove;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.disabled-category {
2-
color: gray !important;
1+
.no-active-category > a {
2+
color: #aaa !important;
33
}

dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Category/TreeBlockTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function testDisabledCategoriesHtml()
3131
$layout = $this->_objectManager->get(LayoutInterface::class);
3232
$categoryTree = $layout->getBlock('category.tree');
3333
$blockHtml = $categoryTree->toHtml();
34-
$this->assertStringContainsString('disabled-category', $blockHtml);
34+
$this->assertStringContainsString('no-active-category', $blockHtml);
3535
}
36-
3736
}

0 commit comments

Comments
 (0)