1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Prevents Network UI from scrolling and showing Tower

I also fixed an issue where the mouse-wheel events were not zooming
the network UI in firefox.
This commit is contained in:
Jared Tabor 2018-05-30 14:19:07 -07:00
parent 4c9ceb48a1
commit 70897d3503
No known key found for this signature in database
GPG Key ID: 1B343EC4C3CF7E5C
4 changed files with 18 additions and 2 deletions

View File

@ -19,7 +19,7 @@
</head>
<body data-user-agent="{{userAgent}}">
<div ui-view="networking"></div>
<div ui-view="networking" ng-class="{'NetworkingUIView' : vm.networkUIisOpen}"></div>
<at-layout>
<bread-crumb></bread-crumb>
<toast></toast>

View File

@ -1,3 +1,11 @@
.NetworkingUIView{
position:absolute;
display:block;
width:100vw;
height: 100vh;
z-index: 1101;
}
.Networking-shell{
display:flex;
flex-direction: column;

View File

@ -5,7 +5,7 @@ function NetworkingController (models, $state, $scope, strings) {
const {
inventory
} = models;
vm.networkUIisOpen = true;
vm.strings = strings;
vm.panelTitle = `${strings.get('state.BREADCRUMB_LABEL')} | ${inventory.name}`;
vm.hostDetail = {};
@ -16,6 +16,7 @@ function NetworkingController (models, $state, $scope, strings) {
vm.groups = [];
$scope.devices = [];
vm.close = () => {
vm.networkUIisOpen = false;
$scope.$broadcast('awxNet-closeNetworkUI');
$state.go('inventories');
};

View File

@ -550,6 +550,13 @@ var NetworkUIController = function($scope,
if (originalEvent.wheelDeltaY !== undefined) {
$event.deltaY = $event.originalEvent.wheelDeltaY;
}
if (originalEvent.deltaX !== undefined) {
$event.deltaX = $event.originalEvent.deltaX;
}
if (originalEvent.deltaY !== undefined) {
$event.deltaY = $event.originalEvent.deltaY;
$event.delta = $event.originalEvent.deltaY;
}
}
};