From b8f68f7b7921ebec01bdfb2ac06de08368d1a120 Mon Sep 17 00:00:00 2001 From: chris Houseknecht Date: Fri, 17 Jan 2014 13:41:09 -0500 Subject: [PATCH] AC-946: deferred host filter until after edit window is dismissed and only if save button clicked.. --- awx/ui/static/js/helpers/Groups.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index f268818079..2c927a70c6 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -599,10 +599,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' // Load the modal form var scope = generator.inject(form, { mode: 'edit', modal: true, related: false, show_modal: false }); generator.reset(); - - // Change the selected group - if (parent_scope.selected_tree_id !== tree_id) - parent_scope.showHosts(tree_id, group_id, false); GetSourceTypeOptions({ scope: scope, variable: 'source_type_options' }); @@ -823,12 +819,20 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' } }); //Clean up - scope.searchCleanup(); + if (scope.searchCleanUp) + scope.searchCleanup(); scope.formModalActionDisabled = false; scope.showGroupHelp = false; //get rid of the Hint - Wait('stop'); - $('#form-modal').modal('hide'); - } + + $('#form-modal').modal('hide'); + + // Change the selected group + if (parent_scope.selected_tree_id !== tree_id) + parent_scope.showHosts(tree_id, group_id, false); + } + else { + Wait('stop'); + } }); if (scope.removeFormSaveSuccess) {