diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index 845009e8b4..249354fc3f 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -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) { diff --git a/awx/ui/static/js/controllers/Authentication.js b/awx/ui/static/js/controllers/Authentication.js index fc605bdf5e..277aeac96f 100644 --- a/awx/ui/static/js/controllers/Authentication.js +++ b/awx/ui/static/js/controllers/Authentication.js @@ -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' ]; diff --git a/awx/ui/static/lib/ansible/Utilities.js b/awx/ui/static/lib/ansible/Utilities.js index 1b83243690..7af00374ba 100644 --- a/awx/ui/static/lib/ansible/Utilities.js +++ b/awx/ui/static/lib/ansible/Utilities.js @@ -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) {