Skip to content

Commit

Permalink
refresh live data on browser focus event to avoid broken progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhat Can committed Aug 10, 2017
1 parent 9907b45 commit 474ea0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions scenario-generator/src/main/resources/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ <h3>{{agent.name}}</h3> <em>{{agent.description}}</em>

</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular-animate.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular-sanitize.js"></script>
Expand Down
5 changes: 5 additions & 0 deletions scenario-generator/src/main/resources/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ angular.module('scenarioGenerator').controller('scenarioCtrl', function ($scope,

init();

// TODO: a hack to fix the progress bar after tab is changed
$(window).focus(function () {
init();
});

$ctrl.openStartScenarioModal = function (selectedAgent, parentSelector) {
var modalInstance = $uibModal.open({
animation: true,
Expand Down

0 comments on commit 474ea0c

Please sign in to comment.