Skip to content

Commit eeb88cc

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

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +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-
$item['a_attr'] = ['class' => $node->getIsActive() ? 'active-category' : 'no-active-category'];
395+
$item['a_attr'] = ['class' => $node->getIsActive() ? 'active-category' : 'not-active-category'];
396396
//$item['allowDrop'] = ($level<3) ? true : false;
397397
$allowMove = $this->_isCategoryMoveable($node);
398398
$item['allowDrop'] = $allowMove;

app/code/Magento/Catalog/view/adminhtml/layout/catalog_category_edit.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<update handle="styles"/>
1010
<head>
1111
<css src="jquery/uppy/dist/uppy.fileupload-ui.css"/>
12-
<css src="Magento_Catalog::css/styles.css"/>
1312
<link src="Magento_Catalog::js/edit-tree.js"/>
1413
</head>
1514
<update handle="editor"/>

app/code/Magento/Catalog/view/adminhtml/web/css/styles.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/design/adminhtml/Magento/backend/Magento_Catalog/web/css/source/_module.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,13 @@
121121
}
122122
}
123123
}
124+
125+
//
126+
// Catalog Category Tree
127+
// ---------------------------------------------
128+
129+
.jstree-children {
130+
.not-active-category {
131+
color: #aaaaaa;
132+
}
133+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ public function testDisabledCategoriesHtml()
4949
$this->assertCount(1, $categoryTreeArray);
5050
$this->assertArrayHasKey('a_attr', $categoryTreeArray[0]);
5151
$this->assertArrayHasKey('class', $categoryTreeArray[0]['a_attr']);
52-
$this->assertStringContainsString('no-active-category', $categoryTreeArray[0]['a_attr']['class']);
52+
$this->assertStringContainsString('not-active-category', $categoryTreeArray[0]['a_attr']['class']);
5353
}
5454
}

0 commit comments

Comments
 (0)