From: Marcin Koziej Date: Wed, 13 Feb 2013 14:00:33 +0000 (+0100) Subject: maxscore X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/fe2efcc993737271367ce4fd41e6ae3353b14eb5 maxscore --- diff --git a/catalogue/static/catalogue/js/edumed.js b/catalogue/static/catalogue/js/edumed.js index a99377d..2c5e308 100644 --- a/catalogue/static/catalogue/js/edumed.js +++ b/catalogue/static/catalogue/js/edumed.js @@ -125,7 +125,14 @@ }; Exercise.prototype.show_score = function(score) { - return $(".message", this.element).text("Wynik: " + score[0] + " / " + score[1]); + var $msg; + $msg = $(".message", this.element); + $msg.text("Wynik: " + score[0] + " / " + score[1]); + if (score[0] === score[1]) { + return $msg.addClass("maxscore"); + } else { + return $msg.removeClass("maxscore"); + } }; Exercise.prototype.draggable_equal = function($draggable1, $draggable2) {