From 10e85b50b10f15599395bce4d91378441005f2a5 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Wed, 5 Mar 2014 14:13:17 -0500 Subject: [PATCH] Found an issue when deleting multipkle credentials. First delete worked fine. Second delete left the overlay hiding the page. Seems the .off() option on bootstrap modal no longer works as expected. --- awx/ui/static/js/controllers/Credentials.js | 4 ++-- awx/ui/static/js/controllers/Inventories.js | 2 +- awx/ui/static/js/controllers/JobTemplates.js | 2 +- awx/ui/static/js/controllers/Organizations.js | 2 +- awx/ui/static/js/controllers/Permissions.js | 2 +- awx/ui/static/js/controllers/Projects.js | 2 +- awx/ui/static/js/controllers/Users.js | 2 +- awx/ui/static/js/helpers/Groups.js | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/awx/ui/static/js/controllers/Credentials.js b/awx/ui/static/js/controllers/Credentials.js index 9bb097ebb7..7a61ed52e5 100644 --- a/awx/ui/static/js/controllers/Credentials.js +++ b/awx/ui/static/js/controllers/Credentials.js @@ -39,11 +39,11 @@ function CredentialsList($scope, $rootScope, $location, $log, $routeParams, Rest $scope.removePostRefresh(); } $scope.removePostRefresh = $scope.$on('PostRefresh', function () { - // Cleanup after a delete var i, j; + // Cleanup after a delete Wait('stop'); - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); list.fields.kind.searchOptions = $scope.credential_kind_options; diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index 8f21e36a06..de1997e4ce 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -88,7 +88,7 @@ function InventoriesList($scope, $rootScope, $location, $log, $routeParams, Rest $scope.removePostRefresh = $scope.$on('PostRefresh', function () { //If we got here by deleting an inventory, stop the spinner and cleanup events Wait('stop'); - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); for (var i = 0; i < $scope.inventories.length; i++) { diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index 5d1d417dec..6877083daf 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -31,7 +31,7 @@ function JobTemplatesList($scope, $rootScope, $location, $log, $routeParams, Res $scope.removePostRefresh = $scope.$on('PostRefresh', function () { // Cleanup after a delete Wait('stop'); - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); }); SearchInit({ diff --git a/awx/ui/static/js/controllers/Organizations.js b/awx/ui/static/js/controllers/Organizations.js index b92964d3be..88122b212b 100644 --- a/awx/ui/static/js/controllers/Organizations.js +++ b/awx/ui/static/js/controllers/Organizations.js @@ -37,7 +37,7 @@ function OrganizationsList($routeParams, $scope, $rootScope, $location, $log, Re $scope.removePostRefresh = $scope.$on('PostRefresh', function () { // Cleanup after a delete Wait('stop'); - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); }); // Initialize search and pagination, then load data diff --git a/awx/ui/static/js/controllers/Permissions.js b/awx/ui/static/js/controllers/Permissions.js index 0b63bb4492..86bca92127 100644 --- a/awx/ui/static/js/controllers/Permissions.js +++ b/awx/ui/static/js/controllers/Permissions.js @@ -37,7 +37,7 @@ function PermissionsList($scope, $rootScope, $location, $log, $routeParams, Rest $scope.removePostRefresh = $scope.$on('PostRefresh', function () { // Cleanup after a delete Wait('stop'); - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); }); SearchInit({ diff --git a/awx/ui/static/js/controllers/Projects.js b/awx/ui/static/js/controllers/Projects.js index c474bf70fb..90aa02a78f 100644 --- a/awx/ui/static/js/controllers/Projects.js +++ b/awx/ui/static/js/controllers/Projects.js @@ -47,7 +47,7 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest, // Cleanup after a delete var j, i; Wait('stop'); - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); if ($scope.projects) { for (i = 0; i < $scope.projects.length; i++) { diff --git a/awx/ui/static/js/controllers/Users.js b/awx/ui/static/js/controllers/Users.js index 33326753a6..cce503405f 100644 --- a/awx/ui/static/js/controllers/Users.js +++ b/awx/ui/static/js/controllers/Users.js @@ -36,7 +36,7 @@ function UsersList($scope, $rootScope, $location, $log, $routeParams, Rest, Aler $scope.removePostRefresh = $scope.$on('PostRefresh', function () { // Cleanup after a delete Wait('stop'); - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); }); $rootScope.flashMessage = null; diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index 1c358ac180..8a3526974d 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -1057,7 +1057,7 @@ angular.module('GroupsHelper', ['RestServices', 'Utilities', 'ListGenerator', 'G Rest.setUrl(url); Rest.post({ id: node.group_id, disassociate: 1 }) .success(function () { - $('#prompt-modal').off(); + $('#prompt-modal').modal('hide'); scope.$emit('GroupDeleteCompleted'); // Signal a group refresh to start }) .error(function (data, status) {