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

New: Add option to make entire menu items clickable (fixes #157) #188

Closed
wants to merge 17 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Move click event to boxmenu-item__inner instead of boxmenu-item
  • Loading branch information
swashbuck committed Apr 9, 2024
commit a4fa56df1f47150c525d588f6defd8344cbab567
7 changes: 0 additions & 7 deletions js/BoxMenuItemView.js
Original file line number Diff line number Diff line change
@@ -13,12 +13,6 @@ class BoxMenuItemView extends MenuItemView {
}

events() {
if (this.areEntireItemsClickable()) {
return {
click: 'onClickMenuItemButton'
};
}

return {
'click .js-btn-click': 'onClickMenuItemButton'
};
@@ -58,7 +52,6 @@ class BoxMenuItemView extends MenuItemView {
}

areEntireItemsClickable() {
console.log(this.model);
return Adapt.course.get('_boxMenu')?._areEntireItemsClickable;
oliverfoster marked this conversation as resolved.
Show resolved Hide resolved
}
}
2 changes: 1 addition & 1 deletion templates/boxMenuItem.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{import_globals}}
{{import_adapt}}

<div class="menu-item__inner boxmenu-item__inner">
<div class="menu-item__inner boxmenu-item__inner{{#if Adapt.course._boxMenu._areEntireItemsClickable}} js-btn-click{{/if}}">

{{#if _graphic.src}}
<div class="menu-item__image-container boxmenu-item__image-container">