maxscore
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Wed, 13 Feb 2013 14:00:33 +0000 (15:00 +0100)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Wed, 13 Feb 2013 14:00:39 +0000 (15:00 +0100)
catalogue/static/catalogue/js/edumed.js

index a99377d..2c5e308 100644 (file)
     };
 
     Exercise.prototype.show_score = function(score) {
     };
 
     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) {
     };
 
     Exercise.prototype.draggable_equal = function($draggable1, $draggable2) {