Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutor icon update and custom event on dropdown added #609

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion v2-library/_src/js/popupMenu.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// dropdown
(function tutorDropdownMenu() {
const dropdownCloseEvent = new Event("tutor_dropdown_closed");

document.addEventListener('click', (e) => {
const dropdownAttr = 'action-tutor-dropdown';
const dropDownTarget = e.target.hasAttribute(dropdownAttr)
Expand All @@ -13,6 +15,7 @@

if (dropdownParent.classList.contains('is-open')) {
dropdownParent.classList.remove('is-open');
dropdownParent.dispatchEvent(dropdownCloseEvent);
} else {
document
.querySelectorAll('.tutor-dropdown-parent')
Expand All @@ -36,7 +39,10 @@
document
.querySelectorAll('.tutor-dropdown-parent')
.forEach((dropdownParent) => {
dropdownParent.classList.remove('is-open');
if (dropdownParent.classList.contains('is-open')) {
dropdownParent.classList.remove('is-open');
dropdownParent.dispatchEvent(dropdownCloseEvent);
}
});
}
}
Expand Down
152 changes: 0 additions & 152 deletions v2-library/bundle/fonts/tutor-icon/demo-files/demo.css

This file was deleted.

30 changes: 0 additions & 30 deletions v2-library/bundle/fonts/tutor-icon/demo-files/demo.js

This file was deleted.

Loading
Loading