diff --git a/app/assets/javascripts/my_modules/status_flow.js b/app/assets/javascripts/my_modules/status_flow.js index 8030fc1a2..f9078b4ce 100644 --- a/app/assets/javascripts/my_modules/status_flow.js +++ b/app/assets/javascripts/my_modules/status_flow.js @@ -2,16 +2,16 @@ (function() { $('.task-sharing-and-flows').on('click', '#viewTaskFlow', function() { - $('#statusFlowModal').modal('show'); - }); - - $('#statusFlowModal').on('show.bs.modal', function() { - var $modalBody = $(this).find('.modal-body'); - animateSpinner($modalBody); - $.get($(this).data('status-flow-url'), function(result) { - animateSpinner($modalBody, false); - $modalBody.html(result.html); + $('#statusFlowModal').off('shown.bs.modal').on('shown.bs.modal', function() { + var $modalBody = $(this).find('.modal-body'); + animateSpinner($modalBody); + $.get($(this).data('status-flow-url'), function(result) { + animateSpinner($modalBody, false); + $modalBody.html(result.html); + }); }); + + $('#statusFlowModal').modal('show'); }); function checkStatusState() {