mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
fixed modal being open on route change and modal scrolling
This commit is contained in:
parent
63d91268ea
commit
8f1cdbdbf9
@ -2066,3 +2066,7 @@ tr td button i {
|
||||
.select2-container--disabled {
|
||||
opacity: .35;
|
||||
}
|
||||
|
||||
body.is-modalOpen {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
.AddPermissions-body {
|
||||
padding: 0px 20px;
|
||||
max-height: 70vh;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.AddPermissions-footer {
|
||||
|
@ -18,6 +18,8 @@ export default
|
||||
link: function(scope, element, attrs, ctrl) {
|
||||
scope.toggleFormTabs('users');
|
||||
|
||||
$("body").addClass("is-modalOpen");
|
||||
|
||||
$("body").append(element);
|
||||
|
||||
Wait('start');
|
||||
@ -35,6 +37,7 @@ export default
|
||||
});
|
||||
|
||||
scope.closeModal = function() {
|
||||
$("body").removeClass("is-modalOpen");
|
||||
$('#add-permissions-modal').on('hidden.bs.modal',
|
||||
function () {
|
||||
$('.AddPermissions').remove();
|
||||
@ -42,6 +45,10 @@ export default
|
||||
$('#add-permissions-modal').modal('hide');
|
||||
};
|
||||
|
||||
scope.$on('closePermissionsModal', function() {
|
||||
scope.closeModal();
|
||||
});
|
||||
|
||||
Wait('stop');
|
||||
|
||||
window.scrollTo(0,0);
|
||||
|
@ -1055,6 +1055,7 @@ var tower = angular.module('Tower', [
|
||||
|
||||
|
||||
$rootScope.$on("$stateChangeStart", function (event, next, nextParams, prev) {
|
||||
$rootScope.$broadcast("closePermissionsModal");
|
||||
// this line removes the query params attached to a route
|
||||
if(prev && prev.$$route &&
|
||||
prev.$$route.name === 'systemTracking'){
|
||||
|
Loading…
Reference in New Issue
Block a user