From d5d45c0b0c18aef136ecfa6db2f40b2cab2b6366 Mon Sep 17 00:00:00 2001 From: nemunaire Date: Sat, 23 Jan 2016 13:19:59 +0100 Subject: [PATCH] Hide sent message when get response for a submission --- frontend/static/js/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/static/js/app.js b/frontend/static/js/app.js index a8083ca6..a566958c 100644 --- a/frontend/static/js/app.js +++ b/frontend/static/js/app.js @@ -164,6 +164,7 @@ angular.module("FICApp") angular.forEach($scope.flags, function(flag,kid) { flgs[flag.name] = flag.value; + flag.value = ""; }); $http({ @@ -177,13 +178,13 @@ angular.module("FICApp") var checkDiff = function() { $http.get("/my.json").success(function(my) { if ($scope.my.exercices[$rootScope.current_exercice].solved_time != my.exercices[$rootScope.current_exercice].solved_time) { - $scope.my = my; + $rootScope.refresh(); } else { $timeout(checkDiff, 750); } }); }; - checkDiff() + checkDiff(); }).error(function(data, status, header, config) { if (status >= 500) { $scope.my.exercices[$rootScope.current_exercice].submitted = false;