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 currentPathArr = this.get('currentPath').split('.');
|
||||||
let navPartial = '';
|
let navPartial = '';
|
||||||
let isInCurrentPath = false;
|
let isInCurrentPath = false;
|
||||||
|
let bottomRow = Ember.$('.bottom-row');
|
||||||
|
|
||||||
hoverableTabs.forEach((tab) => {
|
hoverableTabs.forEach((tab) => {
|
||||||
if (currentPathArr.contains(tab)) {
|
if (currentPathArr.contains(tab)) {
|
||||||
|
|
@ -79,14 +80,17 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
if (this.get('forcedMenu')) {
|
if (this.get('forcedMenu')) {
|
||||||
navPartial = 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) {
|
if (isInCurrentPath) {
|
||||||
this.set('subnavPartial', `tabs/${navPartial}`);
|
this.set('subnavPartial', `tabs/${navPartial}`);
|
||||||
} else {
|
} else {
|
||||||
this.set('subnavPartial', null);
|
this.set('subnavPartial', null);
|
||||||
Ember.$('.bottom-row').toggleClass('subhover');
|
|
||||||
}
|
}
|
||||||
}).on('init'),
|
}).on('init'),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -254,12 +254,12 @@ HEADER {
|
||||||
.bottom-row {
|
.bottom-row {
|
||||||
min-height: $bottomHeight;
|
min-height: $bottomHeight;
|
||||||
background-color: $bottom-row;
|
background-color: $bottom-row;
|
||||||
|
transition: ease all .05s;
|
||||||
|
|
||||||
&.subactive {
|
&.subactive {
|
||||||
background-color: $accent-two;
|
background-color: $accent-two;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NAV {
|
NAV {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-left: 68px;
|
margin-left: 68px;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue