mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
fix open/close on settings nav item hover
This commit is contained in:
@@ -5,11 +5,15 @@ function atSideNavItemLink (scope, element, attrs, ctrl) {
|
|||||||
|
|
||||||
if (attrs.showSettingsSubMenu) {
|
if (attrs.showSettingsSubMenu) {
|
||||||
element.hover(() => {
|
element.hover(() => {
|
||||||
|
scope.navVm.onSettingsNavItem = true;
|
||||||
scope.navVm.showSettingsSubMenu = true;
|
scope.navVm.showSettingsSubMenu = true;
|
||||||
}, () => {
|
}, () => {
|
||||||
// TODO: don't hide when mouse is hovering over the sub menu itself
|
setTimeout(() => {
|
||||||
// currently it closes as soon as you nav off of the settings side nav item
|
scope.navVm.onSettingsNavItem = false;
|
||||||
scope.navVm.showSettingsSubMenu = false;
|
if (!scope.navVm.onSettingsSubPane) {
|
||||||
|
scope.navVm.showSettingsSubMenu = false;
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ function atSideNavLink (scope, element, attrs, ctrl) {
|
|||||||
scope.$emit('clickOutsideSideNav');
|
scope.$emit('clickOutsideSideNav');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
element.find('.at-SettingsSubPane').hover(() => {
|
||||||
|
scope.vm.onSettingsSubPane = true;
|
||||||
|
}, () => {
|
||||||
|
if (!scope.vm.onSettingsNavItem) {
|
||||||
|
scope.vm.onSettingsSubPane = false;
|
||||||
|
scope.vm.showSettingsSubMenu = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function AtSideNavController ($scope, $window) {
|
function AtSideNavController ($scope, $window) {
|
||||||
|
|||||||
Reference in New Issue
Block a user