Skip to content

Commit f1e88d4

Browse files
author
Dmytro Aponasenko
committed
Merge branch 'develop' of https://github.corp.ebay.com/magento2/magento2ce into mavericks
Conflicts: dev/tests/functional/tests/app/Magento/Backend/Test/Page/Adminhtml/Dashboard.xml dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/EstimateShippingAndTaxStep.php dev/tests/functional/tests/app/Magento/Cms/Test/Page/CmsIndex.xml
2 parents 293e6fe + 2e67ccb commit f1e88d4

File tree

1,066 files changed

+28737
-29990
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,066 files changed

+28737
-29990
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
0.42.0-beta11
2+
=============
3+
* Various improvements:
4+
* Added LICENSE to Developer module
5+
* Refactored Catalog and related module to use mutable data object interface
6+
* Refactored Sales and related modules to use mutable data interfaces
7+
* Setup:
8+
* Added styles for new module enabling / disabling section in Installation wizard
9+
* Modules Install and upgrade capabilities are refactored to implement interfaces used by Setup application
10+
* Framework:
11+
* Moved/refactored Magento\IO\Sftp adapter into Filesystem library
12+
* Removed Magento IO library
13+
* Implemented Dynamic Types Binding in SOAP
14+
* Implemented Extensible Attributes generation
15+
* Improved Web API Related Code Quality
16+
* Moved Specific Helper Components From the Magento/Core Module to Magento/Framework
17+
* Performance:
18+
* Inline JS code is eliminated
19+
* Created fixture for changing Magento config update via Performance Toolkit Generator
20+
* Fixed bugs:
21+
* Issue with multiple addresses checkout
22+
* Issue with catalog page update after a product status changes
23+
* Issue with distance between "Log in" & "or" & "Register" in Frontend header
24+
* Issue with tax details and amounts in frontend and backend order
25+
* JavaScript error when clicking on toggle arrow to show FPT in shopping cart
26+
* PHP Warning when trying to checkout with Multiple Addresses on review order page
27+
* Functional tests:
28+
* Refactored end-to-end test for order placement from backend and for OnePageCheckout
29+
* GitHub requests:
30+
* [#1035] (https://github.com/magento/magento2/issues/1035) -- Bug in Magento\Framework\Simplexml\Element::appendChild
31+
* [#1053] (https://github.com/magento/magento2/issues/1053) -- #865: add getParams/setParam to RequestInterface
32+
* [#1066] (https://github.com/magento/magento2/issues/1066) -- PHP 5.5.16-1+deb.sury.org~precise+1
33+
134
0.42.0-beta10
235
=============
336
* Framework

app/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
\Magento\Framework\Profiler::applyConfig($_SERVER['MAGE_PROFILER'], BP, !empty($_REQUEST['isAjax']));
3636
}
3737
if (ini_get('date.timezone') == '') {
38-
date_default_timezone_set(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE);
38+
date_default_timezone_set('UTC');
3939
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ public function getSystemMessageDialogJson()
121121
[
122122
'systemMessageDialog' => [
123123
'autoOpen' => false,
124-
'width' => 600,
125-
'ajaxUrl' => $this->_getMessagesUrl(),
124+
'width' => '75%',
125+
'modal' => true,
126+
'dialogClass' => 'ui-dialog-active ui-popup-message',
127+
'ajaxUrl' => $this->_getMessagesUrl()
126128
],
127129
]
128130
);

app/code/Magento/AdminNotification/Block/ToolbarEntry.php

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@ class ToolbarEntry extends \Magento\Backend\Block\Template
1818
/**
1919
* Number of notifications showed on expandable window
2020
*/
21-
const NOTIFICATIONS_NUMBER = 4;
21+
const NOTIFICATIONS_NUMBER = 3;
22+
23+
/**
24+
* Number of notifications showed on icon
25+
*/
26+
const NOTIFICATIONS_COUNTER_MAX = 99;
27+
28+
/**
29+
* Length of notification description showed by default
30+
*/
31+
const NOTIFICATION_DESCRIPTION_LENGTH = 150;
2232

2333
/**
2434
* Collection of latest unread notifications
@@ -41,6 +51,26 @@ public function __construct(
4151
$this->_notificationList = $notificationList;
4252
}
4353

54+
/**
55+
* Retrieve notification description start length
56+
*
57+
* @return int
58+
*/
59+
public function getNotificationDescriptionLength()
60+
{
61+
return self::NOTIFICATION_DESCRIPTION_LENGTH;
62+
}
63+
64+
/**
65+
* Retrieve notification counter max value
66+
*
67+
* @return int
68+
*/
69+
public function getNotificationCounterMax()
70+
{
71+
return self::NOTIFICATIONS_COUNTER_MAX;
72+
}
73+
4474
/**
4575
* Retrieve number of unread notifications
4676
*
@@ -69,13 +99,18 @@ public function getLatestUnreadNotifications()
6999
*/
70100
public function formatNotificationDate($dateString)
71101
{
72-
if (date('Ymd') == date('Ymd', strtotime($dateString))) {
73-
return $this->formatTime(
74-
$dateString,
75-
\Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT,
76-
false
102+
$date = new \DateTime($dateString);
103+
if ($date == new \DateTime('today')) {
104+
return $this->_localeDate->formatDateTime(
105+
$date,
106+
\IntlDateFormatter::NONE,
107+
\IntlDateFormatter::SHORT
77108
);
78109
}
79-
return $this->formatDate($dateString, \Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true);
110+
return $this->_localeDate->formatDateTime(
111+
$date,
112+
\IntlDateFormatter::MEDIUM,
113+
\IntlDateFormatter::MEDIUM
114+
);
80115
}
81116
}

app/code/Magento/AdminNotification/composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.5.0|~5.6.0",
6-
"magento/module-store": "0.42.0-beta10",
7-
"magento/module-backend": "0.42.0-beta10",
8-
"magento/module-media-storage": "0.42.0-beta10",
9-
"magento/framework": "0.42.0-beta10",
6+
"magento/module-store": "0.42.0-beta11",
7+
"magento/module-backend": "0.42.0-beta11",
8+
"magento/module-media-storage": "0.42.0-beta11",
9+
"magento/framework": "0.42.0-beta11",
1010
"lib-libxml": "*",
1111
"magento/magento-composer-installer": "*"
1212
},
1313
"type": "magento2-module",
14-
"version": "0.42.0-beta10",
14+
"version": "0.42.0-beta11",
1515
"license": [
1616
"OSL-3.0",
1717
"AFL-3.0"

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@
66
*/
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9-
<head>
10-
<css src="Magento_Theme::prototype/magento.css"/>
11-
</head>
129
<body>
1310
<referenceContainer name="notifications">
1411
<block class="Magento\AdminNotification\Block\System\Messages" name="system_messages" as="system_messages" before="-" template="Magento_AdminNotification::system/messages.phtml"/>
1512
<block class="Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup" name="unread_system_messages" as="unread_system_messages" after="system_messages" template="Magento_AdminNotification::system/messages/popup.phtml"/>
1613
<block class="Magento\AdminNotification\Block\Window" name="notification_window" as="notification_window" acl="Magento_AdminNotification::show_toolbar" template="notification/window.phtml"/>
1714
</referenceContainer>
1815
<referenceContainer name="header">
19-
<block class="Magento\AdminNotification\Block\ToolbarEntry" before="user" template="toolbar_entry.phtml"/>
16+
<block class="Magento\AdminNotification\Block\ToolbarEntry" name="notification.messages" before="user" template="toolbar_entry.phtml"/>
2017
</referenceContainer>
2118
</body>
2219
</page>

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
* @see \Magento\AdminNotification\Block\Window
1313
*/
1414
?>
15-
<div data-mage-init='{"modalPopup": {}}' class="fade critical-notification">
15+
<div data-mage-init='{"modalPopup": {}}' class="fade critical-notification admin__scope">
1616
<div class="popup popup-<?php echo preg_replace('#[^a-z0-9]+#', '-', strtolower($block->getSeverityText())) ?>">
1717
<div class="popup-inner">
18-
<header class="popup-header">
19-
<h2 class="popup-title"><?php echo $block->getHeaderText(); ?></h2>
20-
</header>
18+
<div class="popup-header">
19+
<div class="popup-title"><?php echo $block->getHeaderText(); ?></div>
20+
</div>
2121
<div class="popup-content">
2222
<span><?php echo $block->getSeverityText();?></span>
23+
2324
<p class="message-text"><?php echo $block->getNoticeMessageText(); ?></p>
2425

2526
<a href="<?php echo $block->getNoticeMessageUrl(); ?>"><?php echo $block->getReadDetailsText(); ?></a>
2627
</div>
27-
<span class="close" data-dismiss="popup" title="<?php echo __('Close popup'); ?>"><?php echo __('Close'); ?></span>
28+
<span class="action close" data-dismiss="popup" title="<?php echo $block->escapeHtml(__('Close popup'));?>"><?php echo __('Close'); ?></span>
2829
</div>
2930
</div>
3031
</div>

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,34 @@
1010
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages */ ?>
1111

1212
<?php $lastCritical = $block->getLastCritical();?>
13-
<div id="system_messages" class="message-system<?php if ($lastCritical): ?> message-system-unread<?php endif; ?>">
13+
<div id="system_messages" class="message-system<?php if ($lastCritical): ?> message-system-unread<?php endif; ?> admin__scope">
1414
<div class="message-system-inner">
1515
<?php if ($lastCritical): ?>
1616
<ul class="message-system-list">
17-
<li class="error"><!-- warning -->
17+
<li class="message message-warning error">
1818
<?php echo $lastCritical->getText();?>
1919
</li>
2020
</ul>
2121
<?php endif; ?>
2222
<div class="message-system-short">
23-
System Messages:
23+
<span class="message-system-short-label">
24+
<?php echo __('System Messages:')?>
25+
</span>
26+
2427
<?php if ($block->getCriticalCount()): ?>
25-
<span class="error"><a href="#" title="<?php echo $block->escapeHtml(__('Critical System Messages'));?>"><?php echo $block->getCriticalCount();?></a></span>
28+
<div class="message message-warning error">
29+
<a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Critical System Messages'));?>">
30+
<?php echo $block->getCriticalCount();?>
31+
</a>
32+
</div>
2633
<?php endif;?>
34+
2735
<?php if ($block->getMajorCount()): ?>
28-
<span class="warning"><a href="#" title="<?php echo $block->escapeHtml(__('Major System Messages'));?>"><?php echo $block->getMajorCount();?></a></span>
36+
<div class="message message-warning warning">
37+
<a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Major System Messages'));?>">
38+
<?php echo $block->getMajorCount();?>
39+
</a>
40+
</div>
2941
<?php endif;?>
3042
</div>
3143
<div id="message-system-all" title="<?php echo $block->escapeHtml(__('System messages'));?>" data-mage-init='<?php echo $block->escapeHtml($block->getSystemMessageDialogJson());?>'></div>

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@
88

99
?>
1010
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ ?>
11-
<div id="system_messages_list" title="<?php echo $block->escapeHtml($block->getPopupTitle()); ?>">
11+
12+
<div id="system_messages_list" class="admin__scope" title="<?php echo $block->escapeHtml($block->getPopupTitle()); ?>">
1213
<ul class="message-system-list">
1314
<?php foreach ($block->getUnreadMessages() as $message): ?>
14-
<li class="<?php echo $block->getItemClass($message);?>">
15+
<li class="message message-warning <?php echo $block->getItemClass($message);?>">
1516
<?php echo $message->getText();?>
1617
</li>
1718
<?php endforeach;?>
1819
</ul>
1920
</div>
21+
2022
<script>
2123
require([
2224
"jquery",
@@ -27,18 +29,21 @@ require([
2729
$("#system_messages_list").dialog({
2830
autoOpen: true,
2931
resizable: false,
30-
width: 650,
32+
width: '75%',
33+
modal: true,
34+
dialogClass: 'ui-popup-message',
3135
position: {
32-
using: function(pos) {
33-
$(this).css({
34-
"position": "absolute",
35-
"top": Math.ceil($(window).height()/2 - $(this).height()/2),
36-
"left": pos.left
37-
});
38-
}
36+
my: 'left+12.5% top',
37+
at: 'center top',
38+
of: 'body'
39+
},
40+
open: function() {
41+
$(this).closest('.ui-dialog').addClass('ui-dialog-active');
42+
43+
var topMargin = $(this).closest('.ui-dialog').children('.ui-dialog-titlebar').outerHeight() + 10;
44+
$(this).closest('.ui-dialog').css('margin-top', topMargin);
3945
}
4046
});
4147
});
42-
4348
});
4449
</script>

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

Lines changed: 60 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,77 @@
88

99
?>
1010
<?php /** @var $this \Magento\AdminNotification\Block\ToolbarEntry */ ?>
11-
<?php $notificationCount = $block->getUnreadNotificationCount(); ?>
12-
<div data-mage-init='{"toolbarEntry": {}}' class="notifications-summary" data-notification-count="<?php echo $block->escapeHtml($notificationCount); ?>">
11+
<?php
12+
$notificationCount = $block->getUnreadNotificationCount();
13+
$notificationCounterMax = $block->getNotificationCounterMax();
14+
?>
15+
<div
16+
data-mage-init='{"toolbarEntry": {}}'
17+
class="notifications-wrapper"
18+
data-notification-count="<?php echo $notificationCount; ?>">
1319
<?php if ($notificationCount > 0) : ?>
14-
<a href="<?php echo $block->getUrl('adminhtml/notification/index'); ?>" class="action notifications-action" data-mage-init='{"dropdown":{}}' title="<?php echo __('Notifications'); ?>" data-toggle="dropdown">
15-
<span class="text"><?php echo __('Notifications'); ?></span>
16-
<span class="counter qty"><?php echo $block->escapeHtml($notificationCount); ?></span>
20+
<a
21+
href="<?php echo $block->getUrl('adminhtml/notification/index'); ?>"
22+
class="notifications-action"
23+
data-mage-init='{"dropdown":{}}'
24+
title="<?php echo __('Notifications'); ?>"
25+
data-toggle="dropdown">
26+
<span class="notifications-counter">
27+
<?php echo ($notificationCount > $notificationCounterMax) ? $notificationCounterMax . '+' : $notificationCount; ?>
28+
</span>
1729
</a>
18-
<ul class="dropdown-menu notifications-list" data-mark-as-read-url="<?php echo $block->getUrl('adminhtml/notification/ajaxMarkAsRead'); ?>">
30+
<ul
31+
class="notifications-list"
32+
data-mark-as-read-url="<?php echo $block->getUrl('adminhtml/notification/ajaxMarkAsRead'); ?>">
1933
<?php foreach ($block->getLatestUnreadNotifications() as $notification) : ?>
2034
<?php /** @var $notification \Magento\AdminNotification\Model\Inbox*/ ?>
2135
<li class="notifications-entry<?php if ($notification->getSeverity() == 1): ?> notifications-critical<?php endif; ?>"
22-
data-notification-id="<?php echo $block->escapeHtml($notification->getId()); ?>"
36+
data-notification-id="<?php echo $notification->getId(); ?>"
2337
data-notification-severity="<?php if ($notification->getSeverity() == 1): ?>1<?php endif; ?>">
24-
<strong class="notifications-entry-title"><?php echo $block->escapeHtml($notification->getTitle()); ?></strong>
25-
<span class="notifications-entry-description"><?php echo $block->escapeHtml($notification->getDescription()); ?></span>
26-
<time class="notifications-entry-time"><?php echo $block->escapeHtml($block->formatNotificationDate($notification->getDateAdded())); ?></time>
27-
<button type="button" class="action close notifications-close"><span><?php echo __('Close'); ?></span></button>
28-
<div class="notifications-dialog-content" data-title="<?php echo __('Notification'); ?>" data-cancel-caption="<?php echo __('Cancel'); ?>" data-acknowledge-caption="<?php echo __('Acknowledge'); ?>">
29-
<strong class="notifications-entry-title"><?php echo $block->escapeHtml($notification->getTitle()); ?></strong>
30-
<span class="notifications-entry-description"><?php echo $block->escapeHtml($notification->getDescription()); ?></span>
31-
<div class="actions notifications-entry-actions">
32-
<a class="notifications-url" href="<?php echo $block->escapeUrl($notification->getUrl()); ?>" target="_blank"><?php echo __('Read Details'); ?></a>
33-
</div>
34-
<time class="notifications-entry-time"><?php echo $block->escapeHtml($block->formatNotificationDate($notification->getDateAdded())); ?></time>
35-
</div>
38+
<?php
39+
$notificationDescription = $block->escapeHtml($notification->getDescription());
40+
$notificationDescriptionLength = $block->getNotificationDescriptionLength();
41+
?>
42+
<strong class="notifications-entry-title">
43+
<?php echo $block->escapeHtml($notification->getTitle()); ?>
44+
</strong>
45+
<?php if (strlen($notificationDescription) > $notificationDescriptionLength) : ?>
46+
<p class="notifications-entry-description _cutted">
47+
<span class="notifications-entry-description-start">
48+
<?php echo substr($notificationDescription, 0, $notificationDescriptionLength); ?>
49+
</span>
50+
<span class="notifications-entry-description-end">
51+
<?php echo substr($notificationDescription, $notificationDescriptionLength); ?>
52+
</span>
53+
</p>
54+
<?php else : ?>
55+
<p class="notifications-entry-description">
56+
<?php echo $notificationDescription; ?>
57+
</p>
58+
<?php endif; ?>
59+
<time class="notifications-entry-time">
60+
<?php echo $block->formatNotificationDate($notification->getDateAdded()); ?>
61+
</time>
62+
<button
63+
type="button"
64+
class="notifications-close"
65+
title="<?php echo __('Close'); ?>"
66+
></button>
3667
</li>
3768
<?php endforeach; ?>
38-
<li class="last">
39-
<a href="<?php echo $block->getUrl('adminhtml/notification/index'); ?>" class="action more notification-more"><?php echo __('See All (%1 unread)', $notificationCount); ?></a>
69+
<li class="notifications-entry notifications-entry-last">
70+
<a
71+
href="<?php echo $block->getUrl('adminhtml/notification/index'); ?>"
72+
class="action-tertiary action-more">
73+
<?php echo __('See All (') ?><span class="notifications-counter"><?php echo $notificationCount ?></span><?php echo __(' unread)'); ?>
74+
</a>
4075
</li>
4176
</ul>
4277
<?php else : ?>
43-
<a href="<?php echo $block->getUrl('adminhtml/notification/index'); ?>" class="action notifications-action empty" title="<?php echo __('Notifications'); ?>">
44-
<span class="text"><?php echo __('Notifications'); ?></span>
78+
<a
79+
class="notifications-action"
80+
href="<?php echo $block->getUrl('adminhtml/notification/index'); ?>"
81+
title="<?php echo __('Notifications'); ?>">
4582
</a>
4683
<?php endif; ?>
4784
</div>

0 commit comments

Comments
 (0)