Skip to content

Commit 184b54d

Browse files
author
Roman Liukshyn
committed
Merge remote-tracking branch 'main/develop' into MTA-561
Conflicts: dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php
2 parents aabaa78 + f52e5db commit 184b54d

File tree

3,295 files changed

+42487
-114829
lines changed

Some content is hidden

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

3,295 files changed

+42487
-114829
lines changed

Gruntfile.js

Lines changed: 429 additions & 84 deletions
Large diffs are not rendered by default.

app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac
2222
protected $_countBySeverity = [];
2323

2424
/**
25-
* @param \Magento\Core\Model\EntityFactory $entityFactory
25+
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
2626
* @param \Psr\Log\LoggerInterface $logger
2727
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
2828
* @param \Magento\Framework\Event\ManagerInterface $eventManager
@@ -31,7 +31,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac
3131
* @param \Magento\Framework\Model\Resource\Db\AbstractDb $resource
3232
*/
3333
public function __construct(
34-
\Magento\Core\Model\EntityFactory $entityFactory,
34+
\Magento\Framework\Data\Collection\EntityFactory $entityFactory,
3535
\Psr\Log\LoggerInterface $logger,
3636
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
3737
\Magento\Framework\Event\ManagerInterface $eventManager,

app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Baseurl implements \Magento\Framework\Notification\MessageInterface
2121
protected $_config;
2222

2323
/**
24-
* @var \Magento\Store\Model\StoreManagerInterface
24+
* @var \Magento\Framework\Store\StoreManagerInterface
2525
*/
2626
protected $_storeManager;
2727

@@ -32,13 +32,13 @@ class Baseurl implements \Magento\Framework\Notification\MessageInterface
3232

3333
/**
3434
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
35-
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
35+
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
3636
* @param \Magento\Framework\UrlInterface $urlBuilder
3737
* @param \Magento\Framework\App\Config\ValueFactory $configValueFactory
3838
*/
3939
public function __construct(
4040
\Magento\Framework\App\Config\ScopeConfigInterface $config,
41-
\Magento\Store\Model\StoreManagerInterface $storeManager,
41+
\Magento\Framework\Store\StoreManagerInterface $storeManager,
4242
\Magento\Framework\UrlInterface $urlBuilder,
4343
\Magento\Framework\App\Config\ValueFactory $configValueFactory
4444
) {

app/code/Magento/AdminNotification/view/adminhtml/requirejs-config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
var config = {
77
map: {
88
'*': {
9-
systemMessageDialog: 'Magento_AdminNotification/system/notification'
9+
systemMessageDialog: 'Magento_AdminNotification/system/notification',
10+
toolbarEntry: 'Magento_AdminNotification/toolbar_entry'
1011
}
11-
},
12-
deps: [
13-
"Magento_AdminNotification/toolbar_entry"
14-
]
12+
}
1513
};

app/code/Magento/AdminNotification/view/adminhtml/templates/notification/window.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* @see \Magento\AdminNotification\Block\Window
1313
*/
1414
?>
15-
<div class="fade critical-notification">
15+
<div data-mage-init='{"modalPopup": {}}' class="fade critical-notification">
1616
<div class="popup popup-<?php echo preg_replace('#[^a-z0-9]+#', '-', strtolower($this->getSeverityText())) ?>">
1717
<div class="popup-inner">
1818
<header class="popup-header">

app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
?>
1010
<?php /** @var $this \Magento\AdminNotification\Block\ToolbarEntry */ ?>
1111
<?php $notificationCount = $this->getUnreadNotificationCount(); ?>
12-
<div class="notifications-summary" data-notification-count="<?php echo $this->escapeHtml($notificationCount); ?>">
12+
<div data-mage-init='{"toolbarEntry": {}}' class="notifications-summary" data-notification-count="<?php echo $this->escapeHtml($notificationCount); ?>">
1313
<?php if ($notificationCount > 0) : ?>
1414
<a href="<?php echo $this->getUrl('adminhtml/notification/index'); ?>" class="action notifications-action" data-mage-init='{"dropdown":{}}' title="<?php echo __('Notifications'); ?>" data-toggle="dropdown">
1515
<span class="text"><?php echo __('Notifications'); ?></span>

app/code/Magento/AdminNotification/view/adminhtml/web/toolbar_entry.js

Lines changed: 90 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -4,106 +4,105 @@
44
*/
55
define([
66
"jquery",
7-
"jquery/ui"
7+
"jquery/ui",
8+
"domReady!"
89
], function($){
910
'use strict';
1011

11-
$(document).ready(function() {
12-
// Mark notification as read via AJAX call
13-
var markNotificationAsRead = function(notificationId) {
14-
var requestUrl = $('.notifications-summary .dropdown-menu').attr('data-mark-as-read-url');
15-
$.ajax({
16-
url: requestUrl,
17-
type: 'POST',
18-
dataType: 'json',
19-
data: {
20-
id: notificationId
21-
},
22-
showLoader: false
23-
});
24-
};
25-
var notificationCount = $('.notifications-summary').attr('data-notification-count');
26-
// Remove notification from the list
27-
var removeNotificationFromList = function(notificationEntry) {
28-
notificationEntry.remove();
29-
notificationCount--;
30-
$('.notifications-summary').attr('data-notification-count', notificationCount);
31-
32-
if (notificationCount == 0) {
33-
// Change appearance of the bubble and its behavior when the last notification is removed
34-
$('.notifications-summary .dropdown-menu').remove();
35-
var notificationIcon = $('.notifications-summary .notifications-icon');
36-
notificationIcon.removeAttr('data-toggle');
37-
notificationIcon.off('click.dropdown');
38-
$('.notifications-action .counter').text('');
39-
$('.notifications-action .counter').hide();
40-
} else {
41-
$('.notifications-action .counter').text(notificationCount);
42-
// Modify caption of the 'See All' link
43-
var actionElement = $('.notifications-summary .dropdown-menu .last .action-more');
44-
actionElement.text(actionElement.text().replace(/\d+/, notificationCount));
45-
}
46-
};
47-
48-
// Show popup with notification details
49-
var showNotificationDetails = function(notificationEntry) {
50-
var popupElement = notificationEntry.find('.notifications-dialog-content').clone();
51-
var notificationId = notificationEntry.attr('data-notification-id');
52-
var dialogClassSeverity = 'notifications-entry-dialog';
53-
if (notificationEntry.attr('data-notification-severity')) {
54-
dialogClassSeverity = 'notifications-entry-dialog notifications-entry-dialog-critical';
55-
}
56-
popupElement.dialog({
57-
title: popupElement.attr('data-title'),
58-
minWidth: 500,
59-
modal: true,
60-
dialogClass: dialogClassSeverity,
61-
buttons: [
62-
{
63-
text: popupElement.attr('data-acknowledge-caption'),
64-
'class': 'action-acknowledge primary',
65-
click: function(event) {
66-
markNotificationAsRead(notificationId);
67-
removeNotificationFromList(notificationEntry);
68-
$(this).dialog('close');
69-
}
70-
},
71-
{
72-
text: popupElement.attr('data-cancel-caption'),
73-
'class': 'action-cancel',
74-
click: function(event) {
75-
$(this).dialog('close');
76-
}
77-
}
78-
]
79-
});
80-
popupElement.parent().attr('aria-live','assertive');
81-
popupElement.dialog('open');
82-
};
83-
84-
// Show notification description when corresponding item is clicked
85-
$('.notifications-summary .dropdown-menu .notifications-entry').on('click.showNotification', function(event) {
86-
// hide notification dropdown
87-
$('.notifications-summary .notifications-icon').trigger('click.dropdown');
88-
showNotificationDetails($(this));
89-
event.stopPropagation();
90-
});
91-
92-
// Remove corresponding notification from the list and mark it as read
93-
$('.notifications-close').on('click.removeNotification', function(event) {
94-
var notificationEntry = $(this).closest('.notifications-entry')
95-
var notificationId = notificationEntry.attr('data-notification-id');
96-
markNotificationAsRead(notificationId);
97-
removeNotificationFromList(notificationEntry);
98-
event.stopPropagation();
12+
// Mark notification as read via AJAX call
13+
var markNotificationAsRead = function(notificationId) {
14+
var requestUrl = $('.notifications-summary .dropdown-menu').attr('data-mark-as-read-url');
15+
$.ajax({
16+
url: requestUrl,
17+
type: 'POST',
18+
dataType: 'json',
19+
data: {
20+
id: notificationId
21+
},
22+
showLoader: false
9923
});
24+
};
25+
var notificationCount = $('.notifications-summary').attr('data-notification-count');
26+
// Remove notification from the list
27+
var removeNotificationFromList = function(notificationEntry) {
28+
notificationEntry.remove();
29+
notificationCount--;
30+
$('.notifications-summary').attr('data-notification-count', notificationCount);
10031

101-
// Hide notifications bubble
10232
if (notificationCount == 0) {
33+
// Change appearance of the bubble and its behavior when the last notification is removed
34+
$('.notifications-summary .dropdown-menu').remove();
35+
var notificationIcon = $('.notifications-summary .notifications-icon');
36+
notificationIcon.removeAttr('data-toggle');
37+
notificationIcon.off('click.dropdown');
38+
$('.notifications-action .counter').text('');
10339
$('.notifications-action .counter').hide();
10440
} else {
105-
$('.notifications-action .counter').show();
41+
$('.notifications-action .counter').text(notificationCount);
42+
// Modify caption of the 'See All' link
43+
var actionElement = $('.notifications-summary .dropdown-menu .last .action-more');
44+
actionElement.text(actionElement.text().replace(/\d+/, notificationCount));
45+
}
46+
};
47+
48+
// Show popup with notification details
49+
var showNotificationDetails = function(notificationEntry) {
50+
var popupElement = notificationEntry.find('.notifications-dialog-content').clone();
51+
var notificationId = notificationEntry.attr('data-notification-id');
52+
var dialogClassSeverity = 'notifications-entry-dialog';
53+
if (notificationEntry.attr('data-notification-severity')) {
54+
dialogClassSeverity = 'notifications-entry-dialog notifications-entry-dialog-critical';
10655
}
56+
popupElement.dialog({
57+
title: popupElement.attr('data-title'),
58+
minWidth: 500,
59+
modal: true,
60+
dialogClass: dialogClassSeverity,
61+
buttons: [
62+
{
63+
text: popupElement.attr('data-acknowledge-caption'),
64+
'class': 'action-acknowledge primary',
65+
click: function(event) {
66+
markNotificationAsRead(notificationId);
67+
removeNotificationFromList(notificationEntry);
68+
$(this).dialog('close');
69+
}
70+
},
71+
{
72+
text: popupElement.attr('data-cancel-caption'),
73+
'class': 'action-cancel',
74+
click: function(event) {
75+
$(this).dialog('close');
76+
}
77+
}
78+
]
79+
});
80+
popupElement.parent().attr('aria-live','assertive');
81+
popupElement.dialog('open');
82+
};
83+
84+
// Show notification description when corresponding item is clicked
85+
$('.notifications-summary .dropdown-menu .notifications-entry').on('click.showNotification', function(event) {
86+
// hide notification dropdown
87+
$('.notifications-summary .notifications-icon').trigger('click.dropdown');
88+
showNotificationDetails($(this));
89+
event.stopPropagation();
90+
});
91+
92+
// Remove corresponding notification from the list and mark it as read
93+
$('.notifications-close').on('click.removeNotification', function(event) {
94+
var notificationEntry = $(this).closest('.notifications-entry')
95+
var notificationId = notificationEntry.attr('data-notification-id');
96+
markNotificationAsRead(notificationId);
97+
removeNotificationFromList(notificationEntry);
98+
event.stopPropagation();
10799
});
108100

101+
// Hide notifications bubble
102+
if (notificationCount == 0) {
103+
$('.notifications-action .counter').hide();
104+
} else {
105+
$('.notifications-action .counter').show();
106+
}
107+
109108
});

app/code/Magento/Backend/App/Router.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Router extends \Magento\Core\App\Router\Base
5353
* @param \Magento\Framework\App\ResponseFactory $responseFactory
5454
* @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
5555
* @param \Magento\Framework\UrlInterface $url
56-
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
56+
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
5757
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
5858
* @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo
5959
* @param string $routerId
@@ -70,7 +70,7 @@ public function __construct(
7070
\Magento\Framework\App\ResponseFactory $responseFactory,
7171
\Magento\Framework\App\Route\ConfigInterface $routeConfig,
7272
\Magento\Framework\UrlInterface $url,
73-
\Magento\Store\Model\StoreManagerInterface $storeManager,
73+
\Magento\Framework\Store\StoreManagerInterface $storeManager,
7474
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
7575
\Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo,
7676
$routerId,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function _prepareLayout()
3131

3232
$this->addChild('sales', 'Magento\Backend\Block\Dashboard\Sales');
3333

34-
if ($this->_scopeConfig->getValue(self::XML_PATH_ENABLE_CHARTS, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) {
34+
if ($this->_scopeConfig->getValue(self::XML_PATH_ENABLE_CHARTS, \Magento\Framework\Store\ScopeInterface::SCOPE_STORE)) {
3535
$block = $this->getLayout()->createBlock('Magento\Backend\Block\Dashboard\Diagrams');
3636
} else {
3737
$block = $this->getLayout()->createBlock(

app/code/Magento/Backend/Block/Dashboard/Graph.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function getChartUrl($directUrl = true)
210210

211211
$timezoneLocal = $this->_scopeConfig->getValue(
212212
$this->_localeDate->getDefaultTimezonePath(),
213-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
213+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
214214
);
215215

216216
list($dateStart, $dateEnd) = $this->_collectionFactory->create()->getDateRange(

0 commit comments

Comments
 (0)