Skip to content

Commit 34a5e47

Browse files
author
Bogdan Plieshka
committed
MAGETWO-32250: Header
- Fixed header notifications counter, grid breakpoints, header search overlay and split buttons styles
1 parent d02ea46 commit 34a5e47

File tree

11 files changed

+78
-51
lines changed

11 files changed

+78
-51
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ define([
3939
notificationIcon.off('click.dropdown');
4040
$('.notifications-action .notifications-counter').text('').hide();
4141
} else {
42-
$('.notifications-action .notifications-counter').text(notificationCount);
42+
// Change top counter only for allowable range
43+
if (notificationCount <= 99) {
44+
$('.notifications-action .notifications-counter').text(notificationCount);
45+
}
4346
$('.notifications-entry-last .notifications-counter').text(notificationCount);
4447
// Modify caption of the 'See All' link
4548
var actionElement = $('.notifications-wrapper .notifications-list .last .action-more');

app/design/adminhtml/Magento/backend/Magento_Backend/layout/default.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</referenceContainer>
2323

2424
<referenceContainer name="header" htmlClass="page-header row">
25-
<container name="header.inner.left" before="-" htmlTag="div" htmlClass="page-header-hgroup col-m-8"/>
26-
<container name="header.inner.right" after="header.inner.left" htmlTag="div" htmlClass="page-header-actions col-m-4"/>
25+
<container name="header.inner.left" before="-" htmlTag="div" htmlClass="page-header-hgroup col-l-8 col-m-6"/>
26+
<container name="header.inner.right" after="header.inner.left" htmlTag="div" htmlClass="page-header-actions col-l-4 col-m-6"/>
2727
</referenceContainer>
2828

2929
<move element="page.menu" destination="menu.wrapper" />

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/_menu.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Variables
1212
// ---------------------------------------------
1313

14+
@menu-wrapper__z-index: @menu__z-index - 1;
15+
1416
@menu__background-color: @color-very-dark-grayish-orange;
1517

1618
@menu-logo__margin-bottom: 2.2rem;
@@ -28,9 +30,12 @@
2830
@menu-line-before__background-color: @color-brownie-vanilla;
2931
@menu-line-before__height: 1px;
3032

33+
@menu-overlay__z-index: @menu__z-index - 3;
34+
3135
@submenu__background-color: @menu-item__active__background-color;
3236
@submenu__padding-horizontal: 1.5rem;
3337
@submenu__padding-vertical: 2rem;
38+
@submenu__z-index: @menu__z-index - 2;
3439
@submenu-column__width: 23.8rem;
3540
@submenu-column__width__l: 19.8rem;
3641
@submenu-title__color: @color-white;

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/header/actions-group/_notifications.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
@notifications-action__padding-top: (@page-header-action__height - @notifications-action-icon__size) / 2 + .05rem;
2121
@notifications-action__hover__color: darken(@page-header-action__color, 20%);
2222
@notifications-action-icon__size: 1.9rem;
23+
@notifications-action-menu__z-index: @header__z-index;
2324

2425
@notifications-close__color: @color-gray80;
2526
@notifications-counter__background-color: @color-tomato-brick;

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/header/actions-group/_search.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Variables
1212
// ---------------------------------------------
1313

14+
@search-global__z-index: @user-account-menu__z-index - 10; // Should be lower than user account
15+
1416
@search-global-field__width: @search-global-input__width;
1517

1618
@search-global-input__font-size: @font-size__base;

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/header/actions-group/_user.less

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
// ---------------------------------------------
1313

1414
@user__font-size: round(@font-size__base - .1rem, 1);
15+
1516
@user-account__padding-bottom: .4rem;
1617
@user-account__padding-left: 4rem;
1718
@user-account__padding-top: .7rem;
1819
@user-account__padding-right: 2.8rem;
19-
@user-menu__min-width: 20rem;
20+
21+
@user-account-menu__min-width: 20rem;
22+
@user-account-menu__z-index: @notifications-action-menu__z-index - 10; // Should be lower than notifications
2023

2124
//
2225

@@ -78,7 +81,7 @@
7881

7982
.admin-user-account-text {
8083
display: inline-block;
81-
max-width: @user-menu__min-width - @user-account__padding-left - @user-account__padding-right - 2rem;
84+
max-width: @user-account-menu__min-width - @user-account__padding-left - @user-account__padding-right - 2rem;
8285
overflow: hidden;
8386
text-overflow: ellipsis;
8487
white-space: nowrap;
@@ -89,7 +92,7 @@
8992

9093
&:extend(.abs-page-header-action-menu all);
9194
line-height: @line-height__base;
92-
min-width: @user-menu__min-width;
95+
min-width: @user-account-menu__min-width;
9396
padding: .5em @_user-menu__inden-side;
9497
z-index: 1;
9598
&:before {
@@ -116,7 +119,7 @@
116119
}
117120
.admin-user-name {
118121
display: inline-block;
119-
max-width: @user-menu__min-width;
122+
max-width: @user-account-menu__min-width;
120123
overflow: hidden;
121124
text-overflow: ellipsis;
122125
vertical-align: text-top;

app/design/adminhtml/Magento/backend/Magento_Theme/web/css/source/module.less

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,22 @@ button {
7171
}
7272
}
7373

74-
.actions-split {
75-
button {
76-
margin-left: 0 !important;
77-
}
78-
.dropdown-split(
79-
@_toggle-selector: ~".action-toggle",
80-
@_button-selector: ~".action-default",
81-
@_options-selector : ~".dropdown-menu",
82-
@_dropdown-split-button-border-radius-fix: true,
83-
@_dropdown-split-list-min-width: 175px
84-
);
85-
vertical-align: middle;
86-
.action-toggle:after {
87-
height: 13px;
88-
}
89-
}
74+
//.actions-split {
75+
// button {
76+
// margin-left: 0 !important;
77+
// }
78+
// .dropdown-split(
79+
// @_toggle-selector: ~".action-toggle",
80+
// @_button-selector: ~".action-default",
81+
// @_options-selector : ~".dropdown-menu",
82+
// @_dropdown-split-button-border-radius-fix: true,
83+
// @_dropdown-split-list-min-width: 175px
84+
// );
85+
// vertical-align: middle;
86+
// .action-toggle:after {
87+
// height: 13px;
88+
// }
89+
//}
9090

9191
//
9292
// Icons

app/design/adminhtml/Magento/backend/web/css/override.less

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,13 +1021,20 @@ fieldset[disabled] .address-list .action-delete {
10211021
}
10221022
.actions-split {
10231023
position: relative;
1024-
z-index: 200;
1024+
z-index: 300;
10251025
}
10261026
.actions-split.active,
10271027
.actions-split._active,
10281028
.actions-split:hover {
10291029
box-shadow: 0 0 0 1px #007bdb;
10301030
}
1031+
.actions-split.active .action-toggle.action-primary,
1032+
.actions-split._active .action-toggle.action-primary,
1033+
.actions-split.active .action-toggle.primary,
1034+
.actions-split._active .action-toggle.primary {
1035+
background-color: #ba4000;
1036+
border-color: #ba4000;
1037+
}
10311038
.actions-split.active .dropdown-menu,
10321039
.actions-split._active .dropdown-menu {
10331040
opacity: 1;
@@ -1083,6 +1090,10 @@ fieldset[disabled] .address-list .action-delete {
10831090
.actions-split .action-toggle:hover:after {
10841091
border-color: #000000 transparent transparent transparent;
10851092
}
1093+
.actions-split .action-toggle._active:after,
1094+
.actions-split .action-toggle.active:after {
1095+
transform: none;
1096+
}
10861097
.actions-split .action-toggle.action-secondary:after,
10871098
.actions-split .action-toggle.secondary:after,
10881099
.actions-split .action-toggle.action-primary:after,
@@ -1102,6 +1113,7 @@ fieldset[disabled] .address-list .action-delete {
11021113
.actions-split .dropdown-menu {
11031114
background-color: #ffffff;
11041115
border: 1px solid #007bdb;
1116+
border-radius: 1px;
11051117
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
11061118
display: block;
11071119
left: 0;
@@ -1121,10 +1133,10 @@ fieldset[disabled] .address-list .action-delete {
11211133
padding: .6875em;
11221134
}
11231135
.actions-split .dropdown-menu > li:hover {
1124-
background-color: #e0f6fe;
1136+
background-color: #e3e3e3;
11251137
}
11261138
.actions-split .dropdown-menu > li:active {
1127-
background-color: #c7effd;
1139+
background-color: #cacaca;
11281140
}
11291141
.abs-action-reset,
11301142
.admin__menu .submenu-close,
@@ -2952,7 +2964,7 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger {
29522964
position: absolute;
29532965
right: 0;
29542966
top: 0;
2955-
z-index: 600;
2967+
z-index: 699;
29562968
}
29572969
.menu-wrapper .logo {
29582970
display: block;
@@ -3040,7 +3052,7 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger {
30403052
top: -7.5rem;
30413053
transition: all .7s linear;
30423054
visibility: hidden;
3043-
z-index: 500;
3055+
z-index: 698;
30443056
}
30453057
.admin__menu .level-0 > .submenu._show {
30463058
left: 100%;
@@ -3164,14 +3176,14 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger {
31643176
position: absolute;
31653177
right: 0;
31663178
top: 0;
3167-
z-index: 500;
3179+
z-index: 697;
31683180
}
31693181
.admin-user {
31703182
float: right;
31713183
line-height: 1.4;
31723184
margin-left: .3rem;
31733185
position: relative;
3174-
z-index: 300;
3186+
z-index: 390;
31753187
}
31763188
.admin-user.active .admin-user-account {
31773189
border-color: #007bdb;
@@ -3276,7 +3288,7 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger {
32763288
float: right;
32773289
margin-right: -0.3rem;
32783290
position: relative;
3279-
z-index: 200;
3291+
z-index: 380;
32803292
}
32813293
.search-global-field {
32823294
min-width: 5rem;

app/design/adminhtml/Magento/backend/web/css/source/actions/_actions-split.less

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
.actions-split {
1111
@_action-split__min-width: @_action-toggle__width + @_action-default__min-width;
12+
@_action-split-dropdown__hover__background-color: @color-gray89;
1213
@_action-default__min-width: 9.3rem;
1314
@_action-toggle__width: 4rem;
1415

@@ -22,6 +23,13 @@
2223
}
2324
&.active,
2425
&._active {
26+
.action-toggle {
27+
&.action-primary,
28+
&.primary {
29+
background-color: @button-primary__hover__background-color;
30+
border-color: @button-primary__hover__background-color;
31+
}
32+
}
2533
.dropdown-menu {
2634
opacity: 1;
2735
visibility: visible;
@@ -53,6 +61,13 @@
5361
position: absolute;
5462
right: 0;
5563
top: 0;
64+
// Disable triangle rotation
65+
&._active,
66+
&.active {
67+
&:after {
68+
transform: none;
69+
}
70+
}
5671
&.action-secondary,
5772
&.secondary,
5873
&.action-primary,
@@ -68,6 +83,7 @@
6883
.dropdown-menu {
6984
background-color: @page-wrapper__background-color;
7085
border: 1px solid @button__hover__border-color;
86+
border-radius: 1px;
7187
box-shadow: @component__box-shadow__base;
7288
display: block; // ToDo UI: Should be deleted with old styles
7389
left: 0;
@@ -85,10 +101,10 @@
85101
border: none; // ToDo UI: Should be deleted with old styles
86102
padding: .6875em;
87103
&:hover {
88-
background-color: @dropdown-menu__hover__background-color;
104+
background-color: @_action-split-dropdown__hover__background-color;
89105
}
90106
&:active {
91-
background-color: @dropdown-menu__active__background-color;
107+
background-color: darken(@_action-split-dropdown__hover__background-color, 10%);
92108
}
93109
}
94110
}

app/design/adminhtml/Magento/backend/web/css/source/variables/_structure.less

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,21 @@
3333
@z-index-9: 900;
3434
@z-index-10: 1000;
3535

36-
// z-index 2
37-
@search-global__z-index: @z-index-2;
38-
@split-button__z-index: @z-index-2;
39-
4036
// z-index 3
41-
@user-account-menu__z-index: @z-index-3;
37+
@split-button__z-index: @z-index-3;
4238

4339
// z-index 4
44-
@notifications-action-menu__z-index: @z-index-4;
40+
@header__z-index: @z-index-4;
4541
@page-actions__fixed__z-index: @z-index-4;
4642

4743
// z-index 5
4844
@field-tooltip__z-index: @z-index-5;
49-
@submenu__z-index: @z-index-5;
50-
@menu-overlay__z-index: @z-index-5;
51-
52-
// z-index 6
53-
@menu-wrapper__z-index: @z-index-6;
5445

5546
// z-index 7
5647
@menu__z-index: @z-index-7;
5748

5849
// z-index 8
59-
@overlay__z-index: @z-index-8; // example
60-
61-
// z-index 9
62-
@modal__z-index: @z-index-9; // example
50+
@overlay__z-index: @z-index-8;
6351

6452
// Base z-index for page wrapper to prevent inner page element overlap with pop-ups
6553
@page-wrapper__z-index__base: 1;

0 commit comments

Comments
 (0)