Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Inject dependencies
* @type {string[]}
*/
ChallengeDetailCtrl.$inject = ['$scope', 'ChallengeService', '$q', '$cookies', '$location', '$interval', '$timeout'];
ChallengeDetailCtrl.$inject = ['$scope', 'ChallengeService', '$q', '$cookies', '$location', '$interval', '$timeout', '$rootScope'];

/**
* Controller implementation
Expand All @@ -40,7 +40,7 @@
* @param ChallengeService
* @constructor
*/
function ChallengeDetailCtrl($scope, ChallengeService, $q, $cookies, $location, $interval, $timeout) {
function ChallengeDetailCtrl($scope, ChallengeService, $q, $cookies, $location, $interval, $timeout, $rootScope) {

// set challengeId and challengeType from the url
challengeId = $location.path().split("/")[2];
Expand Down Expand Up @@ -105,6 +105,13 @@
updateTabForNonResults();
};

$rootScope.$on('$locationChangeStart', function(event, toUrl, fromUrl) {
var parser = document.createElement('a');
parser.href = toUrl;
if (!parser.pathname.startsWith("/challenge-details/"))
window.location.reload();
});

var handlePromise = $q.defer();
//The handle is needed to enable the buttons
app
Expand Down