-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added group functionality * Updated aria heading type * Added _renderAsGroup entry to readme, example.json and schema
- Loading branch information
Showing
10 changed files
with
189 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
define([ | ||
'core/js/views/menuItemView', | ||
'./adapt-contrib-boxMenuItemView' | ||
], function(MenuItemView, BoxMenuItemView) { | ||
|
||
var BoxMenuGroupView = MenuItemView.extend({ | ||
|
||
postRender: function() { | ||
_.defer(this.addChildren.bind(this)); | ||
this.$el.imageready(this.setReadyStatus.bind(this)); | ||
this.$el.parents('.boxmenu__item-container').addClass('has-groups'); | ||
} | ||
|
||
}, { | ||
childContainer: '.js-group-children', | ||
childView: BoxMenuItemView, | ||
className: 'boxmenu-group', | ||
template: 'boxMenuGroup' | ||
}); | ||
|
||
return BoxMenuGroupView; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.boxmenu-group { | ||
&__header-inner { | ||
.l-container-responsive(@device-width-large); | ||
} | ||
|
||
&__item-container-inner { | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{{import_globals}} | ||
|
||
<div class="menu-group__inner boxmenu-group__inner"> | ||
|
||
<div class="menu-group__header boxmenu-group__header"> | ||
<div class="menu-group__header-inner boxmenu-group__header-inner"> | ||
|
||
{{#if displayTitle}} | ||
<div class="menu-group__title boxmenu-group__title"> | ||
<div class="js-heading" data-a11y-heading-type="menuGroup"></div> | ||
|
||
<div class="menu-group__title-inner boxmenu-group__title-inner accessible-text-block" aria-hidden="true"> | ||
{{{compile displayTitle}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{#if body}} | ||
<div class="menu-group__body boxmenu-group__body"> | ||
<div class="menu-group__body-inner boxmenu-group__body-inner"> | ||
{{{compile body}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
{{#if instruction}} | ||
<div class="menu-group__instruction boxmenu-group__instruction"> | ||
<div class="menu-group__instruction-inner boxmenu-group__instruction-inner"> | ||
{{{compile instruction}}} | ||
</div> | ||
</div> | ||
{{/if}} | ||
|
||
<div class="menu-group__progress boxmenu-group__progress js-menu-item-progress"> | ||
{{!-- Menu item progress bar will render in here --}} | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="menu-group__container boxmenu-group__container"> | ||
<div class="menu-group__item-container-inner boxmenu-group__item-container-inner js-group-children" role="list"> | ||
{{!-- Grouped menu items render here --}} | ||
</div> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,5 +52,4 @@ | |
</div> | ||
</div> | ||
|
||
|
||
</div> |