e.stopImmediatePropagation();
// console.log('mouseup on back');
_this._hide($elem);
- if (parentSubMenu.length) {
+
+ // If there is a parent submenu, call show
+ let parentSubMenu = $elem.parent('li').parent('ul').parent('li');
++ if (parentSubMenu.length) {
+ _this._show(parentSubMenu);
+ }
});
}
* @param {jQuery} $elem - the current element with a submenu to open, i.e. the `li` tag.
*/
_show($elem) {
- $elem.children('[data-submenu]').addClass('is-active');
+ if(this.options.autoHeight) this.$wrapper.css({height:$elem.children('[data-submenu]').data('calcHeight')});
+ $elem.attr('aria-expanded', true);
+ $elem.children('[data-submenu]').addClass('is-active').attr('aria-hidden', false);
/**
* Fires when the submenu has opened.
* @event Drilldown#open
* @param {jQuery} $elem - the current sub-menu to hide, i.e. the `ul` tag.
*/
_hide($elem) {
+ if(this.options.autoHeight) this.$wrapper.css({height:$elem.parent().closest('ul').data('calcHeight')});
+ var _this = this;
+ $elem.parent('li').attr('aria-expanded', false);
+ $elem.attr('aria-hidden', true).addClass('is-closing')
+ $elem.addClass('is-closing')
.one(Foundation.transitionend($elem), function(){
$elem.removeClass('is-active is-closing');
$elem.blur();
}
}
+ .#{$expanded}.#{$row} .#{$-zf-size}-#{$collapse}.#{$row} {
+ margin-left: 0;
+ margin-right: 0;
+ }
+
.#{$-zf-size}-#{$uncollapse} {
- $gutter: -zf-get-bp-val($grid-column-gutter, $-zf-size);
-
- > .#{$column} { @include grid-col-uncollapse($gutter); }
+ > .#{$column} { @include grid-col-gutter($-zf-size); }
}
// Positioning
$input-transition: box-shadow 0.5s, border-color 0.25s ease-in-out;
$input-number-spinners: true;
$input-radius: $global-radius;
+ $button-radius: $global-radius;
-// 20. Label
+// 19. Label
// ---------
$label-background: $primary-color;