From ade961fd3899b50d721e2a0c70456d24fa41df70 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Wed, 20 Nov 2013 22:37:29 +0000 Subject: [PATCH] AC-674 flash message is now cleared whenever AS is summoned. --- awx/ui/static/js/widgets/Stream.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/awx/ui/static/js/widgets/Stream.js b/awx/ui/static/js/widgets/Stream.js index 309bea0703..78b0cbc142 100644 --- a/awx/ui/static/js/widgets/Stream.js +++ b/awx/ui/static/js/widgets/Stream.js @@ -164,8 +164,9 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti } }]) - .factory('ShowDetail', ['Rest', 'Alert', 'GenerateForm', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'ActivityDetailForm', 'Empty', - function(Rest, Alert, GenerateForm, ProcessErrors, GetBasePath, FormatDate, ActivityDetailForm, Empty) { + .factory('ShowDetail', ['$rootScope', 'Rest', 'Alert', 'GenerateForm', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'ActivityDetailForm', + 'Empty', + function($rootScope, Rest, Alert, GenerateForm, ProcessErrors, GetBasePath, FormatDate, ActivityDetailForm, Empty) { return function(activity_id) { var generator = GenerateForm; @@ -180,6 +181,8 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti .success( function(data, status, headers, config) { // load up the form var results = data; + $rootScope.flashMessage = null; + $('#form-modal').on('show.bs.modal', function (e) { $('#form-modal-body').css({ width:'auto', //probably not needed @@ -246,7 +249,9 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti var defaultUrl = GetBasePath('activity_stream'); var view = GenerateList; var base = $location.path().replace(/^\//,'').split('/')[0]; - + + $rootScope.flashMessage = null; + if ($location.path() !== '/home') { // Restrict what we're looking at based on the path var type = (base == 'inventories') ? 'inventory' : base.replace(/s$/,'');