Skip to content

Commit 063113b

Browse files
author
Mykhailo Miroshnikov
committed
Merge branch 'admin-styles-migration' of github.corp.ebay.com:magento-webdev/magento2ce into MAGETWO-34476
2 parents 49c46a1 + d02ea46 commit 063113b

File tree

85 files changed

+2405
-1017
lines changed

Some content is hidden

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

85 files changed

+2405
-1017
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
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"/>

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 __('Close popup'); ?>"><?php echo __('Close'); ?></span>
2829
</div>
2930
</div>
3031
</div>

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
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): ?>
1415
<li class="message message-warning <?php echo $block->getItemClass($message);?>">
@@ -17,6 +18,7 @@
1718
<?php endforeach;?>
1819
</ul>
1920
</div>
21+
2022
<script>
2123
require([
2224
"jquery",
@@ -27,18 +29,19 @@ require([
2729
$("#system_messages_list").dialog({
2830
autoOpen: true,
2931
resizable: false,
30-
width: 650,
32+
width: '75%',
33+
modal: true,
34+
dialogClass: 'ui-dialog-active',
3135
position: {
3236
using: function(pos) {
3337
$(this).css({
3438
"position": "absolute",
3539
"top": Math.ceil($(window).height()/2 - $(this).height()/2),
36-
"left": pos.left
40+
"left": "12.5%"
3741
});
3842
}
3943
}
4044
});
4145
});
42-
4346
});
4447
</script>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@
6969
<li class="notifications-entry notifications-entry-last">
7070
<a
7171
href="<?php echo $block->getUrl('adminhtml/notification/index'); ?>"
72-
class="action-tertiary action-more"><?php echo __('See All (%1 unread)', $notificationCount); ?></a>
72+
class="action-tertiary action-more">
73+
<?php echo __('See All (') ?><span class="notifications-counter"><?php echo $notificationCount ?></span><?php echo __(' unread)'); ?>
74+
</a>
7375
</li>
7476
</ul>
7577
<?php else : ?>

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ define([
2020
},
2121

2222
open: function (severity) {
23-
var superMethod = $.proxy(this._super, this);
23+
var superMethod = $.proxy(this._super, this),
24+
listTemplate,
25+
fullTemplate;
2426

2527
$.ajax({
2628
url: this.options.ajaxUrl,
@@ -36,12 +38,12 @@ define([
3638
});
3739

3840
tmpl = $(tmpl);
41+
listTemplate = $('<ul class="message-system-list"></ul>').append(tmpl);
42+
fullTemplate = $('<div class="admin__scope"></div>').append(listTemplate);
3943

40-
this.element.html(
41-
$('<ul />', {
42-
'class': 'message-system-list'
43-
}).append(tmpl)
44-
).trigger('contentUpdated');
44+
this.element
45+
.html(fullTemplate)
46+
.trigger('contentUpdated');
4547

4648
superMethod();
4749
}, this));

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ define([
4040
$('.notifications-action .notifications-counter').text('').hide();
4141
} else {
4242
$('.notifications-action .notifications-counter').text(notificationCount);
43+
$('.notifications-entry-last .notifications-counter').text(notificationCount);
4344
// Modify caption of the 'See All' link
4445
var actionElement = $('.notifications-wrapper .notifications-list .last .action-more');
4546
actionElement.text(actionElement.text().replace(/\d+/, notificationCount));
4647
}
4748
},
4849

49-
// Show popup with notification details
50+
// Show notification details
5051
showNotificationDetails = function (notificationEntry) {
5152
var notificationDescription = notificationEntry.find('.notifications-entry-description'),
5253
notificationDescriptionEnd = notificationEntry.find('.notifications-entry-description-end');
@@ -74,8 +75,16 @@ define([
7475
$('.notifications-close').on('click.removeNotification', function (event) {
7576
var notificationEntry = $(this).closest('.notifications-entry'),
7677
notificationId = notificationEntry.attr('data-notification-id');
78+
7779
markNotificationAsRead(notificationId);
7880
removeNotificationFromList(notificationEntry);
81+
82+
// Checking for last unread notification to hide dropdown
83+
if (notificationCount == 0) {
84+
$('.notifications-wrapper').removeClass('active')
85+
.find('.notifications-action').removeAttr('data-toggle')
86+
.off('click.dropdown');
87+
}
7988
event.stopPropagation();
8089
});
8190

app/code/Magento/Backend/Block/System/Design.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function _prepareLayout()
2424
]
2525
);
2626

27-
$this->getLayout()->getBlock('page-title-wrapper')->setPageTitle('Store Design Schedule');
27+
$this->getLayout()->getBlock('page.title')->setPageTitle('Store Design Schedule');
2828

2929
return parent::_prepareLayout();
3030
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function getAttributesHtml()
5959
$title = $this->getLabel();
6060
}
6161
$classes = [];
62-
$classes[] = 'action-';
62+
$classes[] = 'action-default';
6363
$classes[] = 'scalable';
6464
if ($this->getClass()) {
6565
$classes[] = $this->getClass();
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © 2015 Magento. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9+
<update handle="styles" />
10+
<body>
11+
<!-- ToDo: delete after bugfix -->
12+
<remove name="legal"/>
13+
<remove name="page.menu"/>
14+
<remove name="header"/>
15+
<remove name="page.title"/>
16+
<remove name="user"/>
17+
<remove name="header.wrapper.scope"/>
18+
19+
<remove name="global.search"/>
20+
<remove name="notification.messages"/>
21+
<!-- ToDo: end -->
22+
23+
<move element="messages" destination="login.content" before="-"/>
24+
<move element="copyright" destination="login.footer" before="-"/>
25+
<move element="logo" destination="login.header" before="-"/>
26+
<referenceBlock name="logo">
27+
<arguments>
28+
<argument name="logo_image_src" xsi:type="string">images/magento-logo.svg</argument>
29+
</arguments>
30+
</referenceBlock>
31+
32+
</body>
33+
</page>

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

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,11 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
8+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
9+
<update handle="admin_login" />
910
<body>
10-
<!-- ToDo: delete after bugfix -->
11-
<remove name="legal"/>
12-
<remove name="page.menu"/>
13-
<remove name="header"/>
14-
<remove name="logo"/>
15-
<remove name="page.title"/>
16-
<remove name="user"/>
17-
<remove name="global.search"/>
18-
<remove name="notification.messages"/>
19-
<!-- ToDo: end -->
20-
<referenceContainer name="main.content">
21-
<block class="Magento\Backend\Block\Template" name="content" template="admin/login.phtml">
22-
<block class="Magento\Backend\Block\Page\Copyright" name="copyright" as="copyright"/>
11+
<referenceContainer name="login.content">
12+
<block class="Magento\Backend\Block\Template" name="admin.login" template="admin/login.phtml">
2313
<container name="form.additional.info" label="Form Additional Info"/>
2414
<container name="form.buttons" label="Form Buttons">
2515
<block class="Magento\Backend\Block\Template" name="adminhtml_auth_login_buttons" template="admin/login_buttons.phtml"/>

0 commit comments

Comments
 (0)