Skip to content

Commit cab454a

Browse files
committed
Merge branch '4.6' into ibx_9060
2 parents 75fc7d3 + 260a6ca commit cab454a

38 files changed

+283
-129
lines changed

src/bundle/Resources/public/img/ibexa-icons.svg

Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

src/bundle/Resources/public/js/scripts/admin.anchor.navigation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
const header = doc.querySelector('.ibexa-edit-header');
99
const headerContainer = header?.querySelector('.ibexa-edit-header__container');
10-
const SECTION_ADJUST_MARGIN_TOP = 20;
10+
const SECTION_ADJUST_MARGIN_TOP = 36;
1111
const formContainerNode = doc.querySelector('.ibexa-edit-content');
1212
const lastSectionObserver = new ResizeObserver(() => {
1313
fitSections();

src/bundle/Resources/public/js/scripts/core/date.time.picker.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,41 @@ import { setInstance } from '../helpers/object.instances';
44

55
const { ibexa } = window;
66

7+
const SECTION_ADJUSTMENT = 24;
8+
const PICKER_ADJUSTMENT = 2;
79
const DEFAULT_CONFIG = {
810
enableTime: true,
911
time_24hr: true,
1012
formatDate: (date) => formatShortDateTime(date, null),
13+
onOpen: (selectedDates, dateStr, instance) => {
14+
instance.scrollHandler = () => {
15+
if (instance.isOpen) {
16+
const { calendarContainer, input } = instance;
17+
const rect = input.getBoundingClientRect();
18+
const pickerHeight = calendarContainer.offsetHeight;
19+
const spaceBelow = global.innerHeight - (rect.bottom + SECTION_ADJUSTMENT);
20+
21+
if (pickerHeight > spaceBelow) {
22+
calendarContainer.style.top = `${rect.top + global.scrollY - pickerHeight - PICKER_ADJUSTMENT}px`;
23+
calendarContainer.classList.remove('arrowTop');
24+
calendarContainer.classList.add('arrowBottom');
25+
} else {
26+
calendarContainer.style.top = `${rect.bottom + global.scrollY + PICKER_ADJUSTMENT}px`;
27+
calendarContainer.classList.remove('arrowBottom');
28+
calendarContainer.classList.add('arrowTop');
29+
}
30+
}
31+
};
32+
33+
window.addEventListener('scroll', instance.scrollHandler, true);
34+
document.addEventListener('scroll', instance.scrollHandler, true);
35+
36+
instance.scrollHandler();
37+
},
38+
onClose: (selectedDates, dateStr, instance) => {
39+
window.removeEventListener('scroll', instance.scrollHandler, true);
40+
document.removeEventListener('scroll', instance.scrollHandler, true);
41+
},
1142
};
1243

1344
class DateTimePicker {

src/bundle/Resources/public/js/scripts/core/dropdown.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@
9999
const removeSelectionBtn = item.querySelector('.ibexa-dropdown__remove-selection');
100100

101101
removeSelectionBtn.addEventListener('click', (event) => {
102+
const isDisabled = this.container.classList.contains('ibexa-dropdown--disabled');
103+
104+
if (isDisabled) {
105+
return;
106+
}
107+
102108
event.stopPropagation();
103109
this.deselectOption(item);
104110
});

src/bundle/Resources/public/js/scripts/core/popup.menu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
popupMenuItem.addEventListener(
3636
'click',
3737
(event) => {
38-
this.popupMenuElement.classList.add(CLASS_POPUP_MENU_HIDDEN);
38+
this.handleToggle();
3939
this.onItemClick(event);
4040
},
4141
false,
@@ -58,7 +58,7 @@
5858
item.querySelector('.ibexa-popup-menu__item-content').addEventListener(
5959
'click',
6060
(event) => {
61-
this.popupMenuElement.classList.add(CLASS_POPUP_MENU_HIDDEN);
61+
this.handleToggle();
6262
this.onItemClick(event);
6363
},
6464
false,
@@ -94,7 +94,7 @@
9494
return;
9595
}
9696

97-
this.popupMenuElement.classList.add(CLASS_POPUP_MENU_HIDDEN);
97+
this.handleToggle();
9898
}
9999

100100
updatePosition() {

src/bundle/Resources/public/js/scripts/edit.header.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
return;
1010
}
1111

12+
const headerBottomRowNode = headerNode.querySelector('.ibexa-edit-header__row--bottom');
1213
const { height: expandedHeaderHeight } = headerNode.getBoundingClientRect();
1314
const scrolledContent = doc.querySelector('.ibexa-edit-content > :first-child');
1415
const { controlZIndex } = ibexa.helpers.modal;
1516
const fitEllipsizedTitle = () => {
16-
const headerBottomRowNode = headerNode.querySelector('.ibexa-edit-header__row--bottom');
1717
const titleNode = headerBottomRowNode.querySelector('.ibexa-edit-header__name--ellipsized');
1818
const firstMenuEntryNode = headerNode.querySelector('.ibexa-context-menu .ibexa-context-menu__item');
1919
const { left: titleNodeLeft, width: titleNodeWidth } = titleNode.getBoundingClientRect();
@@ -43,6 +43,8 @@
4343

4444
if (shouldHeaderBeSlim) {
4545
fitEllipsizedTitle();
46+
} else {
47+
headerBottomRowNode.style.width = '100%';
4648
}
4749
};
4850

src/bundle/Resources/public/scss/_content-locations.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
.ibexa-table {
1616
&__header-cell {
1717
&--visibility-toggler {
18-
width: calculateRem(300px);
18+
width: calculateRem(120px);
1919
}
2020
}
2121
}

src/bundle/Resources/public/scss/_dropdown.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,18 @@
481481
background-color: $ibexa-color-dark-400;
482482
}
483483
}
484+
485+
&__selected-item {
486+
color: $ibexa-color-dark-400;
487+
fill: $ibexa-color-dark-400;
488+
}
489+
490+
&__remove-selection {
491+
&::before,
492+
&::after {
493+
background: $ibexa-color-dark-400;
494+
}
495+
}
484496
}
485497
}
486498

src/bundle/Resources/public/scss/_edit-header.scss

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
}
3131

3232
&--full {
33-
display: inline-block;
33+
display: -webkit-box;
34+
-webkit-line-clamp: 2;
35+
-webkit-box-orient: vertical;
36+
white-space: normal;
3437
max-width: 100%;
3538
overflow: hidden;
3639
text-overflow: ellipsis;
@@ -44,6 +47,7 @@
4447

4548
&--top {
4649
height: calculateRem(48px);
50+
margin-bottom: calculateRem(16px);
4751

4852
.ibexa-edit-header__title {
4953
height: 0;
@@ -73,31 +77,21 @@
7377
fill: $ibexa-color-dark-400;
7478
}
7579
}
76-
77-
&--left {
78-
max-width: 75%;
79-
80-
.ibexa-label {
81-
margin-bottom: 0;
82-
color: $ibexa-color-dark-400;
83-
}
84-
}
8580
}
8681

8782
&__context-actions {
8883
display: flex;
8984
width: 100%;
9085
}
9186

92-
&__tooltip {
93-
margin-left: calculateRem(8px);
87+
&__info-bar {
9488
display: flex;
95-
align-items: center;
96-
justify-content: center;
89+
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
9790
}
9891

99-
&__action-name-container {
100-
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
92+
&__info-bar-action-type {
93+
display: flex;
94+
align-items: center;
10195
}
10296

10397
&__action-name {
@@ -108,6 +102,8 @@
108102
}
109103

110104
&__subtitle {
105+
margin-top: calculateRem(4px);
106+
font-size: $ibexa-text-font-size-medium;
111107
opacity: 1;
112108
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition;
113109
}
@@ -122,12 +118,30 @@
122118
transition-duration: $ibexa-admin-transition-duration;
123119
}
124120

121+
&__meta {
122+
display: flex;
123+
flex-direction: row;
124+
gap: calculateRem(4px);
125+
}
126+
127+
&__meta-item {
128+
display: flex;
129+
gap: calculateRem(4px);
130+
align-items: center;
131+
margin-top: calculateRem(8px);
132+
padding: calculateRem(4px) calculateRem(8px);
133+
font-size: calculateRem(10px);
134+
color: $ibexa-color-dark-500;
135+
border-radius: calculateRem(16px);
136+
border: calculateRem(1px) solid $ibexa-color-light-600;
137+
}
138+
125139
&__extra-bottom-content {
126140
margin-top: calculateRem(10px);
127141
}
128142

129143
.ibexa-autosave {
130-
display: inline-block;
144+
display: flex;
131145
border-left: calculateRem(1px) solid $ibexa-color-light;
132146
padding-left: calculateRem(12px);
133147
margin-left: calculateRem(12px);
@@ -152,7 +166,7 @@
152166
border-bottom: none;
153167
}
154168

155-
&__action-name-container {
169+
&__info-bar {
156170
margin-top: calculateRem(-8px);
157171
}
158172

@@ -170,6 +184,10 @@
170184
min-height: calculateRem(34px);
171185
}
172186

187+
&__meta {
188+
display: none;
189+
}
190+
173191
&__name {
174192
&--ellipsized {
175193
display: inline-block;

0 commit comments

Comments
 (0)