From e5d148ac18e5af2ff6869a7223e6b09b2d647cb6 Mon Sep 17 00:00:00 2001 From: chris Houseknecht Date: Mon, 20 Jan 2014 13:50:30 -0500 Subject: [PATCH] Activity Stream: clicking view detail no longer re-stringifies the changes JSON. --- awx/ui/static/js/widgets/Stream.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/ui/static/js/widgets/Stream.js b/awx/ui/static/js/widgets/Stream.js index 4a41979f5a..0dcb6bfa5b 100644 --- a/awx/ui/static/js/widgets/Stream.js +++ b/awx/ui/static/js/widgets/Stream.js @@ -181,15 +181,15 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti if (activity) { // Setup changes field - activity['changes'] = JSON.stringify(activity['changes'], null, '\t'); - var n = activity['changes'].match(/\n/g); + activity['changes_stringified'] = JSON.stringify(activity['changes'], null, '\t'); + var n = activity['changes_stringified'].match(/\n/g); var rows = (n) ? n.length : 1; rows = (rows < 1) ? 3 : 10; form.fields['changes'].rows = 10; // Load the form var scope = generator.inject(form, { mode: 'edit', modal: true, related: false }); - scope['changes'] = activity['changes']; + scope['changes'] = activity['changes_stringified']; scope['user'] = ( (activity.summary_fields.actor) ? activity.summary_fields.actor.username : 'system' ) + ' on ' + FormatDate(new Date(activity['timestamp'])); scope['operation'] = activity['description_nolink']; @@ -265,7 +265,7 @@ angular.module('StreamWidget', ['RestServices', 'Utilities', 'StreamListDefiniti } } } - + // Add a container for the stream widget $('#tab-content-container').append('
');