From fe2efcc993737271367ce4fd41e6ae3353b14eb5 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Wed, 13 Feb 2013 15:00:33 +0100 Subject: [PATCH 1/1] maxscore --- catalogue/static/catalogue/js/edumed.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) { -- 2.20.1