Skip to content

Commit efd58a2

Browse files
committed
Merge branch 'develop' of https://github.corp.ebay.com/magento-firedrakes/magento2ce into config2
Conflicts: dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/Dashboard.xml dev/tests/functional/tests/app/Magento/Backend/Test/etc/constraint.xml
2 parents cfcb727 + 8ce0b8d commit efd58a2

File tree

1,822 files changed

+20756
-20181
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,822 files changed

+20756
-20181
lines changed

Gruntfile.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ module.exports = function (grunt) {
99

1010
// Required plugins
1111
// _____________________________________________
12-
var specRunner = require('./dev/tests/js/framework/spec_runner')(grunt);
12+
13+
var specRunner = require('./dev/tests/js/framework/spec_runner')(grunt),
14+
svgo = require('imagemin-svgo');
1315

1416
require('./dev/tools/grunt/tasks/mage-minify')(grunt);
1517

@@ -21,8 +23,6 @@ module.exports = function (grunt) {
2123
pattern: ['grunt-*', '!grunt-template-jasmine-requirejs']
2224
});
2325

24-
var svgo = require('imagemin-svgo');
25-
2626
// Configuration
2727
// _____________________________________________
2828

@@ -318,7 +318,8 @@ module.exports = function (grunt) {
318318

319319
cssmin: {
320320
options: {
321-
report: 'gzip'
321+
report: 'gzip',
322+
keepSpecialComments: 0
322323
},
323324
setup: {
324325
files: {
@@ -342,6 +343,20 @@ module.exports = function (grunt) {
342343
}
343344
},
344345

346+
// Concatenation
347+
// ---------------------------------------------
348+
349+
concat: {
350+
options: {
351+
stripBanners: true,
352+
banner: '/**\n * Copyright © <%= grunt.template.today("yyyy") %> Magento. All rights reserved.\n * See COPYING.txt for license details.\n */\n'
353+
},
354+
setup: {
355+
src: '<%= path.css.setup %>/setup.css',
356+
dest: '<%= path.css.setup %>/setup.css'
357+
}
358+
},
359+
345360

346361
// Watches files for changes and runs tasks based on the changed files
347362
// ---------------------------------------------
@@ -545,7 +560,8 @@ module.exports = function (grunt) {
545560
grunt.task.run([
546561
'less:' + component,
547562
'autoprefixer:' + component,
548-
'cssmin:' + component
563+
'cssmin:' + component,
564+
'concat:' + component
549565
]);
550566
}
551567
if (component == undefined) {

app/code/Magento/AdminNotification/Block/System/Messages/UnreadMessagePopup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getUnreadMessages()
6666
/**
6767
* Retrieve popup title
6868
*
69-
* @return string
69+
* @return \Magento\Framework\Phrase
7070
*/
7171
public function getPopupTitle()
7272
{

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

Lines changed: 4 additions & 4 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\Framework\Store\StoreManagerInterface
24+
* @var \Magento\Store\Model\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\Framework\Store\StoreManagerInterface $storeManager
35+
* @param \Magento\Store\Model\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\Framework\Store\StoreManagerInterface $storeManager,
41+
\Magento\Store\Model\StoreManagerInterface $storeManager,
4242
\Magento\Framework\UrlInterface $urlBuilder,
4343
\Magento\Framework\App\Config\ValueFactory $configValueFactory
4444
) {
@@ -114,7 +114,7 @@ public function isDisplayed()
114114
/**
115115
* Retrieve message text
116116
*
117-
* @return string
117+
* @return \Magento\Framework\Phrase
118118
*/
119119
public function getText()
120120
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getIdentity()
6969
public function isDisplayed()
7070
{
7171
return $this->_authorization->isAllowed(
72-
'Magento_Adminhtml::cache'
72+
'Magento_Backend::cache'
7373
) && count(
7474
$this->_getCacheTypesForRefresh()
7575
) > 0;

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Error.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function _shouldBeDisplayed()
3131
/**
3232
* Retrieve message text
3333
*
34-
* @return string
34+
* @return \Magento\Framework\Phrase
3535
*/
3636
public function getText()
3737
{

app/code/Magento/AdminNotification/Model/System/Message/Media/Synchronization/Success.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function _shouldBeDisplayed()
3030
/**
3131
* Retrieve message text
3232
*
33-
* @return string
33+
* @return \Magento\Framework\Phrase
3434
*/
3535
public function getText()
3636
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function isDisplayed()
129129
/**
130130
* Retrieve message text
131131
*
132-
* @return string
132+
* @return \Magento\Framework\Phrase
133133
*/
134134
public function getText()
135135
{

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
99
<acl>
1010
<resources>
11-
<resource id="Magento_Adminhtml::admin">
12-
<resource id="Magento_Adminhtml::system">
13-
<resource id="Magento_Adminhtml::system_other_settings">
11+
<resource id="Magento_Backend::admin">
12+
<resource id="Magento_Backend::system">
13+
<resource id="Magento_Backend::system_other_settings">
1414
<resource id="Magento_AdminNotification::adminnotification" title="Notifications" sortOrder="10">
1515
<resource id="Magento_AdminNotification::show_toolbar" title="Show Toolbar" sortOrder="10" />
1616
<resource id="Magento_AdminNotification::show_list" title="Show List" sortOrder="20" />

app/code/Magento/AdminNotification/etc/adminhtml/routes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
99
<router id="admin">
1010
<route id="adminhtml">
11-
<module name="Magento_AdminNotification" before="Magento_Adminhtml" />
11+
<module name="Magento_AdminNotification" before="Magento_Backend" />
1212
</route>
1313
</router>
1414
</config>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
99
<head>
10-
<css src="Magento_Core::prototype/magento.css"/>
10+
<css src="Magento_Theme::prototype/magento.css"/>
1111
</head>
1212
<body>
1313
<referenceContainer name="notifications">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<strong class="notifications-entry-title"><?php echo $block->escapeHtml($notification->getTitle()); ?></strong>
2525
<span class="notifications-entry-description"><?php echo $block->escapeHtml($notification->getDescription()); ?></span>
2626
<time class="notifications-entry-time"><?php echo $block->escapeHtml($block->formatNotificationDate($notification->getDateAdded())); ?></time>
27-
<button class="action close notifications-close"><span><?php echo __('Close'); ?></span></button>
27+
<button type="button" class="action close notifications-close"><span><?php echo __('Close'); ?></span></button>
2828
<div class="notifications-dialog-content" data-title="<?php echo __('Notification'); ?>" data-cancel-caption="<?php echo __('Cancel'); ?>" data-acknowledge-caption="<?php echo __('Acknowledge'); ?>">
2929
<strong class="notifications-entry-title"><?php echo $block->escapeHtml($notification->getTitle()); ?></strong>
3030
<span class="notifications-entry-description"><?php echo $block->escapeHtml($notification->getDescription()); ?></span>

app/code/Magento/AdminNotification/view/adminhtml/web/system/notification.js

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,60 @@
22
* Copyright © 2015 Magento. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
/*jshint jquery:true*/
65
define([
7-
"jquery",
8-
"jquery/ui",
9-
"jquery/template"
10-
], function($){
11-
12-
$.template(
13-
'systemMessageDialog',
14-
'<li class="{{if severity == 1}}error{{else}}warning{{/if}}">{{html text}}</li>'
15-
);
6+
'jquery',
7+
'mage/template',
8+
'jquery/ui'
9+
], function ($, mageTemplate) {
10+
'use strict';
1611

1712
$.widget('mage.systemMessageDialog', $.ui.dialog, {
1813
options: {
19-
systemMessageTemplate: 'systemMessageDialog'
14+
systemMessageTemplate:
15+
'<% _.each(data.items, function(item) { %>' +
16+
'<li class="<% if (item.severity == 1) { %>error<% } else { %>warning<% } %>">' +
17+
'<%= item.text %>' +
18+
'</li>' +
19+
'<% }); %>'
2020
},
21-
open: function(severity) {
21+
22+
open: function (severity) {
2223
var superMethod = $.proxy(this._super, this);
24+
2325
$.ajax({
2426
url: this.options.ajaxUrl,
2527
type: 'GET',
26-
data: {severity: severity}
27-
}).done($.proxy(function(data) {
28+
data: {
29+
severity: severity
30+
}
31+
}).done($.proxy(function (data) {
32+
var tmpl = mageTemplate(this.options.systemMessageTemplate, {
33+
data: {
34+
items: data
35+
}
36+
});
37+
38+
tmpl = $(tmpl);
39+
2840
this.element.html(
29-
$('<ul />', {'class': "message-system-list"}).append(
30-
$.tmpl(this.options.systemMessageTemplate, data)
31-
)
41+
$('<ul />', {
42+
'class': 'message-system-list'
43+
}).append(tmpl)
3244
).trigger('contentUpdated');
45+
3346
superMethod();
3447
}, this));
48+
3549
return this;
3650
}
3751
});
3852

39-
$(document).ready(function(){
40-
$('#system_messages .message-system-short .error').on('click', function() {
53+
$(document).ready(function () {
54+
$('#system_messages .message-system-short .error').on('click', function () {
4155
$('#message-system-all').systemMessageDialog('open', 1);
4256
});
43-
$('#system_messages .message-system-short .warning').on('click', function() {
57+
58+
$('#system_messages .message-system-short .warning').on('click', function () {
4459
$('#message-system-all').systemMessageDialog('open', 2);
4560
});
4661
});

app/code/Magento/Authorization/data/authorization_setup/data-install-2.0.0.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
$this->createRules()->setData(
4848
[
4949
'role_id' => $admGroupRole->getId(),
50-
'resource_id' => 'Magento_Adminhtml::all',
50+
'resource_id' => 'Magento_Backend::all',
5151
'privileges' => null,
5252
'permission' => 'allow',
5353
]
5454
)->save();
5555
} else {
5656
/** @var \Magento\Authorization\Model\Rules $rule */
5757
foreach ($rulesCollection as $rule) {
58-
$rule->setData('resource_id', 'Magento_Adminhtml::all')->save();
58+
$rule->setData('resource_id', 'Magento_Backend::all')->save();
5959
}
6060
}

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\Framework\Store\StoreManagerInterface $storeManager
56+
* @param \Magento\Store\Model\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\Framework\Store\StoreManagerInterface $storeManager,
73+
\Magento\Store\Model\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\Framework\Store\ScopeInterface::SCOPE_STORE)) {
34+
if ($this->_scopeConfig->getValue(self::XML_PATH_ENABLE_CHARTS, \Magento\Store\Model\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\Framework\Store\ScopeInterface::SCOPE_STORE
213+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
214214
);
215215

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

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ protected function _prepareColumns()
110110
'items',
111111
[
112112
'header' => __('Items'),
113-
'align' => 'right',
114113
'type' => 'number',
115114
'sortable' => false,
116115
'index' => 'items_count'
@@ -122,8 +121,7 @@ protected function _prepareColumns()
122121
$this->addColumn(
123122
'total',
124123
[
125-
'header' => __('Grand Total'),
126-
'align' => 'right',
124+
'header' => __('Total'),
127125
'sortable' => false,
128126
'type' => 'currency',
129127
'currency_code' => $baseCurrencyCode,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ protected function _prepareLayout()
7171
$sales = $collection->getFirstItem();
7272

7373
$this->addTotal(__('Lifetime Sales'), $sales->getLifetime());
74-
$this->addTotal(__('Average Orders'), $sales->getAverage());
74+
$this->addTotal(__('Average Order'), $sales->getAverage());
7575
}
7676
}

app/code/Magento/Backend/Block/Dashboard/Tab/Customers/Most.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,25 @@ protected function _prepareColumns()
9191
'orders_avg_amount',
9292
[
9393
'header' => __('Average'),
94-
'align' => 'right',
9594
'sortable' => false,
9695
'type' => 'currency',
9796
'currency_code' => $baseCurrencyCode,
98-
'index' => 'orders_avg_amount'
97+
'index' => 'orders_avg_amount',
98+
'header_css_class' => 'col-avg',
99+
'column_css_class' => 'col-avg'
99100
]
100101
);
101102

102103
$this->addColumn(
103104
'orders_sum_amount',
104105
[
105106
'header' => __('Total'),
106-
'align' => 'right',
107107
'sortable' => false,
108108
'type' => 'currency',
109109
'currency_code' => $baseCurrencyCode,
110-
'index' => 'orders_sum_amount'
110+
'index' => 'orders_sum_amount',
111+
'header_css_class' => 'col-total',
112+
'column_css_class' => 'col-total'
111113
]
112114
);
113115

0 commit comments

Comments
 (0)