mirror of https://github.com/rancher/ui.git
toggle class fixed for hover subnav
This commit is contained in:
parent
25a7c33e11
commit
89e96b1ee2
|
|
@ -69,6 +69,7 @@ export default Ember.Component.extend({
|
|||
let currentPathArr = this.get('currentPath').split('.');
|
||||
let navPartial = '';
|
||||
let isInCurrentPath = false;
|
||||
let bottomRow = Ember.$('.bottom-row');
|
||||
|
||||
hoverableTabs.forEach((tab) => {
|
||||
if (currentPathArr.contains(tab)) {
|
||||
|
|
@ -79,14 +80,17 @@ export default Ember.Component.extend({
|
|||
|
||||
if (this.get('forcedMenu')) {
|
||||
navPartial = this.get('forcedMenu');
|
||||
Ember.$('.bottom-row').addClass('subactive');
|
||||
bottomRow.addClass('subactive');
|
||||
} else {
|
||||
if (bottomRow.hasClass('subactive')) {
|
||||
bottomRow.removeClass('subactive');
|
||||
}
|
||||
}
|
||||
|
||||
if (isInCurrentPath) {
|
||||
this.set('subnavPartial', `tabs/${navPartial}`);
|
||||
} else {
|
||||
this.set('subnavPartial', null);
|
||||
Ember.$('.bottom-row').toggleClass('subhover');
|
||||
}
|
||||
}).on('init'),
|
||||
|
||||
|
|
|
|||
|
|
@ -254,12 +254,12 @@ HEADER {
|
|||
.bottom-row {
|
||||
min-height: $bottomHeight;
|
||||
background-color: $bottom-row;
|
||||
transition: ease all .05s;
|
||||
|
||||
&.subactive {
|
||||
background-color: $accent-two;
|
||||
}
|
||||
|
||||
|
||||
NAV {
|
||||
font-size: 14px;
|
||||
margin-left: 68px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue