1
0
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:
John Mitchell 2016-03-10 14:50:42 -05:00
parent 63d91268ea
commit 8f1cdbdbf9
4 changed files with 12 additions and 2 deletions

View File

@ -2066,3 +2066,7 @@ tr td button i {
.select2-container--disabled {
opacity: .35;
}
body.is-modalOpen {
overflow: hidden;
}

View File

@ -40,8 +40,6 @@
.AddPermissions-body {
padding: 0px 20px;
max-height: 70vh;
overflow: scroll;
}
.AddPermissions-footer {

View File

@ -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);

View File

@ -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'){