1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

AC-674 flash message is now cleared whenever AS is summoned.

This commit is contained in:
Chris Houseknecht 2013-11-20 22:37:29 +00:00
parent 8afdb710be
commit ade961fd38

View File

@ -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$/,'');