Skip to content

Commit ab6d04c

Browse files
author
Anton Makarenko
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-33227
2 parents bef0a3f + 5a00464 commit ab6d04c

File tree

1,904 files changed

+27589
-105776
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,904 files changed

+27589
-105776
lines changed

Gruntfile.js

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

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/Block/System/Config/Form/Fieldset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ protected function _getFooterHtml($element)
214214
protected function _getExtraJs($element)
215215
{
216216
$htmlId = $element->getHtmlId();
217-
$output = "Fieldset.applyCollapse('{$htmlId}');";
217+
$output = "require(['prototype'], function(){Fieldset.applyCollapse('{$htmlId}');});";
218218
return $this->_jsHelper->getScript($output);
219219
}
220220

app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function _prepareForm()
100100
'label' => __('Date From'),
101101
'title' => __('Date From'),
102102
'name' => 'date_from',
103-
'image' => $this->getViewFileUrl('images/grid-cal.gif'),
103+
'image' => $this->getViewFileUrl('images/grid-cal.png'),
104104
'date_format' => $dateFormat
105105
//'required' => true
106106
]
@@ -112,7 +112,7 @@ protected function _prepareForm()
112112
'label' => __('Date To'),
113113
'title' => __('Date To'),
114114
'name' => 'date_to',
115-
'image' => $this->getViewFileUrl('images/grid-cal.gif'),
115+
'image' => $this->getViewFileUrl('images/grid-cal.png'),
116116
'date_format' => $dateFormat
117117
//'required' => true
118118
]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getToggleAttributesHtml()
123123
}
124124

125125
$attributes = ['title' => $title, 'class' => join(' ', $classes), 'disabled' => $disabled];
126-
$this->_getDataAttributes(['toggle' => 'dropdown'], $attributes);
126+
$this->_getDataAttributes(['mage-init' => '{"dropdown": {}}', 'toggle' => 'dropdown'], $attributes);
127127

128128
$html = $this->_getAttributesString($attributes);
129129
$html .= $this->getUiId('dropdown');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ protected function _applyTypeSpecificConfig($inputType, $element, \Magento\Eav\M
226226
$element->setCanBeEmpty(true);
227227
break;
228228
case 'date':
229-
$element->setImage($this->getViewFileUrl('images/grid-cal.gif'));
229+
$element->setImage($this->getViewFileUrl('images/grid-cal.png'));
230230
$element->setDateFormat($this->_localeDate->getDateFormatWithLongYear());
231231
break;
232232
case 'multiline':

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Date.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function getHtml()
9999
'",
100100
buttonImage: "' .
101101
$this->getViewFileUrl(
102-
'images/grid-cal.gif'
102+
'images/grid-cal.png'
103103
) . '",
104104
buttonText: "' . $this->escapeHtml(__('Date selector')) .
105105
'",

app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Datetime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function getHtml()
139139
dateFormat: "' . $format . '",
140140
timeFormat: "' . $timeFormat . '",
141141
showsTime: ' . ($this->getColumn()->getFilterTime() ? 'true' : 'false') . ',
142-
buttonImage: "' . $this->getViewFileUrl('images/grid-cal.gif') . '",
142+
buttonImage: "' . $this->getViewFileUrl('images/grid-cal.png') . '",
143143
buttonText: "' . $this->escapeHtml(__('Date selector')) . '",
144144
from: {
145145
id: "' . $htmlId . '_from"

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,10 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
99
<head>
1010
<title>Magento Admin</title>
11-
<link src="prototype/prototype.js"/>
12-
<link src="prototype/window.js"/>
13-
<link src="scriptaculous/builder.js"/>
14-
<link src="scriptaculous/effects.js"/>
15-
<link src="lib/ccard.js"/>
16-
<link src="prototype/validation.js"/>
17-
<link src="varien/js.js"/>
18-
<link src="mage/adminhtml/varienLoader.js"/>
19-
<link src="mage/adminhtml/tools.js"/>
20-
<link src="lib/ds-sleight.js" ie_condition="lt IE 7" defer="defer"/>
21-
<css src="mage/calendar.css"/>
11+
<link src="legacy-build.min.js"/>
2212
<link src="requirejs/require.js"/>
23-
<link src="mage/requirejs/resolver.js"/>
24-
<link src="jquery/jquery.js"/>
25-
<link src="mage/jquery-no-conflict.js"/>
26-
<link src="app-config.js"/>
27-
<link src="extjs/ext-tree.js"/>
28-
<link src="extjs/ext-tree-checkbox.js"/>
13+
<link src="jquery.js"/>
14+
<css src="mage/calendar.css"/>
2915
<css src="extjs/resources/css/ext-all.css"/>
3016
<css src="extjs/resources/css/ytheme-magento.css"/>
3117
</head>
@@ -87,7 +73,6 @@
8773
<referenceContainer name="after.body.start">
8874
<block class="Magento\RequireJs\Block\Html\Head\Config" name="requirejs-config"/>
8975
<block class="Magento\Translation\Block\Js" name="translate" template="Magento_Translation::translate.phtml"/>
90-
<block class="Magento\Framework\View\Element\Template" name="head.scripts" template="Magento_Backend::page/js/head_scripts.phtml"/>
9176
<block class="Magento\Framework\View\Element\Js\Components" name="head.components" as="components" template="Magento_Backend::page/js/components.phtml"/>
9277
<block class="Magento\Framework\View\Element\Html\Calendar" name="head.calendar" as="calendar" template="Magento_Backend::page/js/calendar.phtml"/>
9378
</referenceContainer>

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

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

0 commit comments

Comments
 (0)