Skip to content

Commit 444ca77

Browse files
committed
ph 2
1 parent d0405cc commit 444ca77

8 files changed

Lines changed: 181 additions & 181 deletions

File tree

src/bundle/Resources/public/js/scripts/helpers/tooltips.helper.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,10 @@ const hideAll = (baseElement = doc) => {
259259
const tooltipsNode = baseElement.querySelectorAll(TOOLTIPS_SELECTOR);
260260

261261
for (const tooltipNode of tooltipsNode) {
262-
const tooltipInstance = bootstrap.Tooltip.getInstance(tooltipNode);
262+
bootstrap.Tooltip.getOrCreateInstance(tooltipNode).hide();
263+
// const tooltipInstance = bootstrap.Tooltip.getInstance(tooltipNode);
263264

264-
tooltipInstance?.dispose();
265+
// tooltipInstance?.dispose();
265266
}
266267
};
267268
const observe = (baseElement = doc) => {

src/bundle/Resources/public/js/scripts/sidebar/main.menu.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
return;
66
}
77

8-
const objectInstances = ibexa.helpers.objectInstances;
8+
const { objectInstances } = ibexa.helpers;
99
const firstLevelMenuNode = mainMenuNode.querySelector('.ibexa-main-menu__navbar--first-level');
1010
const expandToggleButton = firstLevelMenuNode.querySelector('.ibexa-main-menu__expand-toggler');
1111
const firstLevelNavItems = [...firstLevelMenuNode.querySelectorAll('.ibexa-main-menu__item[data-item-name]')];
@@ -166,15 +166,15 @@
166166
}
167167
});
168168
};
169-
const syncActiveItems = (itemName) => {
170-
firstLevelNavItems.forEach((itemNode) => {
171-
const isCurrentItem = itemNode.dataset.itemName === itemName;
172-
173-
itemNode.querySelectorAll('.ibexa-main-menu__item-action').forEach((actionNode) => {
174-
actionNode.classList.toggle('active', isCurrentItem);
175-
});
176-
});
177-
};
169+
// const syncActiveItems = (itemName) => {
170+
// firstLevelNavItems.forEach((itemNode) => {
171+
// const isCurrentItem = itemNode.dataset.itemName === itemName;
172+
173+
// itemNode.querySelectorAll('.ibexa-main-menu__item-action').forEach((actionNode) => {
174+
// actionNode.classList.toggle('active', isCurrentItem);
175+
// });
176+
// });
177+
// };
178178
const openCurrentAccordion = () => {
179179
const currentItemNode = firstLevelMenuNode.querySelector(
180180
'.ibexa-main-menu__item[data-has-children="true"] .ibexa-main-menu__item-action--selected',
@@ -318,5 +318,4 @@
318318
itemNode.classList.add('ibexa-main-menu__item--expanded');
319319
}
320320
});
321-
322321
})(window, window.document, window.ibexa);

src/bundle/Resources/public/scss/_main-menu-popup.scss

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,33 @@
22
@use '@ibexa-admin-ui/src/bundle/Resources/public/scss/functions/calculate.rem' as *;
33

44
.ibexa-main-menu-popup {
5-
.ibexa-popup-menu__item:not(.ibexa-main-menu-popup__group-item) > .ibexa-popup-menu__item-content {
6-
height: calculateRem(36px);
5+
background-color: $ibexa-color-dark;
6+
border-color: $ibexa-color-dark-500;
7+
8+
&__item-content {
9+
color: $ibexa-color-white;
710
padding: calculateRem(7.5px) calculateRem(12px);
8-
font-size: calculateRem(14px);
911

1012
> .ibexa-main-menu__item-text-column {
1113
padding: 0;
1214
}
1315

14-
&:hover > .ibexa-main-menu__item-text-column {
16+
&:hover {
1517
color: $ibexa-color-complementary-primary-400;
18+
background-color: transparent;
19+
}
20+
21+
&--current {
22+
> .ibexa-main-menu__item-text-column {
23+
color: $ibexa-color-complementary-primary-400;
24+
}
1625
}
1726
}
1827

1928
&__group-item {
2029
flex-direction: column;
2130
height: 100%;
2231
align-items: initial;
23-
// border-top: calculateRem(1px) solid $ibexa-color-dark-500;
24-
// color: $ibexa-color-light-700;
25-
// font-size: $ibexa-text-font-size-small;
2632

2733
.ibexa-popup-menu {
2834
&__item {
@@ -31,7 +37,12 @@
3137
}
3238
}
3339

34-
.ibexa-main-menu-popup &__group-name {
40+
&__group-item-content {
41+
color: $ibexa-color-dark-300;
42+
padding: 0;
43+
}
44+
45+
&__group-name {
3546
border-top: calculateRem(1px) solid $ibexa-color-dark-500;
3647
color: $ibexa-color-dark-500;
3748
font-size: $ibexa-text-font-size-small;
@@ -42,29 +53,9 @@
4253
border-radius: 0;
4354
width: initial;
4455

45-
> .ibexa-main-menu__item-text-column {
46-
padding: 1px 0;
47-
}
48-
4956
&:hover {
5057
background-color: initial;
5158
color: $ibexa-color-dark-500;
5259
}
5360
}
54-
55-
.ibexa-popup-menu__item-content--current {
56-
background-color: transparent;
57-
58-
> .ibexa-main-menu__item-text-column {
59-
color: $ibexa-color-complementary-primary-400;
60-
}
61-
62-
&:hover {
63-
background-color: transparent;
64-
65-
> .ibexa-main-menu__item-text-column {
66-
color: $ibexa-color-complementary-primary-400;
67-
}
68-
}
69-
}
7061
}

0 commit comments

Comments
 (0)