mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Remove open modals when logging in
If the session times out, and the user attempts to open a modal dialog, then it must be closed due to the fact that bootstrap modals do not work with more than one modal open. The login modal is a bootstrap modal so all other modals need to be closed when it is shown.
This commit is contained in:
parent
9c80dba4a2
commit
1ffca45c4a
@ -437,7 +437,7 @@ angular.module('Tower', [
|
||||
}])
|
||||
|
||||
.run(['$compile', '$cookieStore', '$rootScope', '$log', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'Timer', 'ClearScope', 'HideStream', 'Socket',
|
||||
'LoadConfig', 'Store', 'ShowSocketHelp', 'LicenseViewer', 'AboutAnsibleHelp', 'ConfigureTower', 'CreateCustomInventory' ,
|
||||
'LoadConfig', 'Store', 'ShowSocketHelp', 'LicenseViewer', 'AboutAnsibleHelp', 'ConfigureTower', 'CreateCustomInventory',
|
||||
function ($compile, $cookieStore, $rootScope, $log, CheckLicense, $location, Authorization, LoadBasePaths, Timer, ClearScope, HideStream, Socket,
|
||||
LoadConfig, Store, ShowSocketHelp, LicenseViewer, AboutAnsibleHelp, ConfigureTower, CreateCustomInventory) {
|
||||
|
||||
|
||||
@ -60,12 +60,14 @@
|
||||
'use strict';
|
||||
|
||||
function Authenticate($log, $cookieStore, $compile, $window, $rootScope, $location, Authorization, ToggleClass, Alert, Wait,
|
||||
Timer, Empty) {
|
||||
Timer, Empty, ClearScope) {
|
||||
|
||||
var setLoginFocus, lastPath, sessionExpired, loginAgain,
|
||||
e, html, scope = $rootScope.$new();
|
||||
|
||||
setLoginFocus = function () {
|
||||
// Need to clear out any open dialog windows that might be open when this modal opens.
|
||||
ClearScope();
|
||||
$('#login-username').focus();
|
||||
};
|
||||
|
||||
@ -249,5 +251,5 @@ function Authenticate($log, $cookieStore, $compile, $window, $rootScope, $locati
|
||||
}
|
||||
|
||||
Authenticate.$inject = ['$log', '$cookieStore', '$compile', '$window', '$rootScope', '$location', 'Authorization', 'ToggleClass', 'Alert', 'Wait',
|
||||
'Timer', 'Empty'
|
||||
'Timer', 'Empty', 'ClearScope'
|
||||
];
|
||||
|
||||
@ -40,6 +40,10 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$('.ui-dialog-content').each(function(){
|
||||
$(this).dialog('close');
|
||||
});
|
||||
|
||||
try {
|
||||
$('#help-modal').dialog('close');
|
||||
} catch (e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user