Skip to content

Commit ac4dc25

Browse files
committed
MAGETWO-34180: Active item in Nivagation menu is not highlighted
- Merge remote-tracking branch 'origin/UI' into MAGETWO-34180 - Conflicts: - lib/web/css/source/lib/_navigation.less
2 parents a9c6cdc + 7264538 commit ac4dc25

File tree

1,323 files changed

+19088
-18966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,323 files changed

+19088
-18966
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ atlassian*
2020
/lib/internal/flex/varien/.project
2121
/lib/internal/flex/varien/.settings
2222
/node_modules
23+
/.grunt
2324

2425
/pub/media/*.*
2526
!/pub/media/.htaccess

.php_cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ $finder = Symfony\CS\Finder\DefaultFinder::create()
1515
->exclude('dev/tests/functional/vendor')
1616
->exclude('dev/tests/integration/tmp')
1717
->exclude('dev/tests/integration/var')
18-
->exclude('lib/internal/Apache')
1918
->exclude('lib/internal/CardinalCommerce')
2019
->exclude('lib/internal/Cm')
2120
->exclude('lib/internal/Credis')

Gruntfile.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ module.exports = function (grunt) {
6060
'less:luma',
6161
'less:backend'
6262
],
63-
63+
/**
64+
* Styles for backend theme
65+
*/
66+
backend: [
67+
'less:backend',
68+
'replace:escapeCalc',
69+
'less:override'
70+
],
6471
/**
6572
* Documentation
6673
*/

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,56 @@
88

99
class ListAction extends \Magento\Backend\App\AbstractAction
1010
{
11+
/**
12+
* @var \Magento\Framework\Json\Helper\Data
13+
*/
14+
protected $jsonHelper;
15+
16+
/**
17+
* @var \Magento\AdminNotification\Model\Resource\System\Message\Collection
18+
*/
19+
protected $messageCollection;
20+
21+
/**
22+
* Initialize ListAction
23+
*
24+
* @param \Magento\Backend\App\Action\Context $context
25+
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
26+
* @param \Magento\AdminNotification\Model\Resource\System\Message\Collection $messageCollection
27+
*/
28+
public function __construct(
29+
\Magento\Backend\App\Action\Context $context,
30+
\Magento\Framework\Json\Helper\Data $jsonHelper,
31+
\Magento\AdminNotification\Model\Resource\System\Message\Collection $messageCollection
32+
) {
33+
$this->jsonHelper = $jsonHelper;
34+
$this->messageCollection = $messageCollection;
35+
parent::__construct($context);
36+
}
37+
1138
/**
1239
* @return void
1340
*/
1441
public function execute()
1542
{
1643
$severity = $this->getRequest()->getParam('severity');
17-
$messageCollection = $this->_objectManager->get(
18-
'Magento\AdminNotification\Model\Resource\System\Message\Collection'
19-
);
2044
if ($severity) {
21-
$messageCollection->setSeverity($severity);
45+
$this->messageCollection->setSeverity($severity);
2246
}
2347
$result = [];
24-
foreach ($messageCollection->getItems() as $item) {
25-
$result[] = ['severity' => $item->getSeverity(), 'text' => $item->getText()];
48+
foreach ($this->messageCollection->getItems() as $item) {
49+
$result[] = [
50+
'severity' => $item->getSeverity(),
51+
'text' => $item->getText(),
52+
];
53+
}
54+
if (empty($result)) {
55+
$result[] = [
56+
'severity' => (string)\Magento\Framework\Notification\MessageInterface::SEVERITY_NOTICE,
57+
'text' => 'You have viewed and resolved all recent system notices. '
58+
. 'Please refresh the web page to clear the notice alert.',
59+
];
2660
}
27-
$this->getResponse()->representJson(
28-
$this->_objectManager->get('Magento\Framework\Json\Helper\Data')->jsonEncode($result)
29-
);
61+
$this->getResponse()->representJson($this->jsonHelper->jsonEncode($result));
3062
}
3163
}

app/code/Magento/AdminNotification/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Core/etc/config.xsd">
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Store/etc/config.xsd">
99
<default>
1010
<system>
1111
<adminnotification>

app/code/Magento/AdminNotification/etc/module.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
99
<module name="Magento_AdminNotification" setup_version="2.0.0">
1010
<sequence>
11-
<module name="Magento_Core"/>
1211
<module name="Magento_Store"/>
1312
</sequence>
1413
</module>

app/code/Magento/Authorization/Model/Acl/AclRetriever.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ public function getAllowedResourcesByUser($userType, $userId)
7575
try {
7676
$role = $this->_getUserRole($userType, $userId);
7777
if (!$role) {
78-
throw new AuthorizationException('The role associated with the specified user cannot be found.');
78+
throw new AuthorizationException(
79+
__('The role associated with the specified user cannot be found.')
80+
);
7981
}
8082
$allowedResources = $this->getAllowedResourcesByRole($role->getId());
8183
} catch (AuthorizationException $e) {

app/code/Magento/Authorization/Setup/InstallData.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,17 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
8585
$rule->setData('resource_id', 'Magento_Backend::all')->save();
8686
}
8787
}
88+
89+
/**
90+
* Delete rows by condition from authorization_rule
91+
*/
92+
$setup->startSetup();
93+
94+
$tableName = $setup->getTable('authorization_rule');
95+
if ($tableName) {
96+
$setup->getConnection()->delete($tableName, ['resource_id = ?' => 'admin/system/tools/compiler']);
97+
}
98+
99+
$setup->endSetup();
88100
}
89101
}

app/code/Magento/Backend/Block/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ protected function _addSubMenu($menuItem, $level, $limit)
410410
if ($level == 0 && $limit) {
411411
$colStops = $this->_columnBrake($menuItem->getChildren(), $limit);
412412
$output .= '<strong class="submenu-title">' . $this->_getAnchorLabel($menuItem) . '</strong>';
413-
$output .= '<button class="submenu-close _close"></button>';
413+
$output .= '<a href="#" class="submenu-close _close" data-role="close-submenu"></a>';
414414
}
415415

416416
$output .= $this->renderNavigation($menuItem->getChildren(), $level + 1, $limit, $colStops);

app/code/Magento/Backend/Block/Widget.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,4 @@ public function getButtonHtml($label, $onclick, $class = '', $buttonId = null, $
8989
$dataAttr
9090
)->toHtml();
9191
}
92-
93-
/**
94-
* @return string
95-
*/
96-
public function getGlobalIcon()
97-
{
98-
return '<img src="' . $this->getViewFileUrl(
99-
'images/fam_link.gif'
100-
) . '" alt="' . __(
101-
'Global Attribute'
102-
) . '" title="' . __(
103-
'This attribute shares the same value in all stores.'
104-
) . '" class="attribute-global"/>';
105-
}
10692
}

0 commit comments

Comments
 (0)