From: Radek Czajka Date: Thu, 14 Feb 2013 10:46:03 +0000 (+0100) Subject: maxscore style; fix exercise: Luki X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/90654be51d9c0fe797340fe1c39ffcca3665d780?ds=sidebyside;hp=3268c2681874b53c1a9fbda5f7ab1388d62226b4 maxscore style; fix exercise: Luki --- diff --git a/catalogue/static/catalogue/css/exercise.css b/catalogue/static/catalogue/css/exercise.css index dc5ab1b..05b005f 100644 --- a/catalogue/static/catalogue/css/exercise.css +++ b/catalogue/static/catalogue/css/exercise.css @@ -41,7 +41,9 @@ font-weight: bold; } .exercise .buttons .message { float: right; - margin-right: 1.25em; } + padding: 0 1.25em; } + .exercise .buttons .maxscore { + background: #16a487; } .exercise .buttons input.check { background: #ed7831; } @@ -52,7 +54,8 @@ z-index: 2; display: inline-block; margin: 0.313em; - z-index: 2; } + z-index: 2; + max-width: 38em; } .luki .question-piece.disabled { background-color: #eee; color: #d4d6d8; } diff --git a/catalogue/static/catalogue/css/exercise.scss b/catalogue/static/catalogue/css/exercise.scss index 039b088..cd87f12 100755 --- a/catalogue/static/catalogue/css/exercise.scss +++ b/catalogue/static/catalogue/css/exercise.scss @@ -96,7 +96,10 @@ $px: 0.0625em; } .message { float: right; - margin-right: 20*$px; + padding: 0 20*$px; + } + .maxscore { + background: #16a487; } input.check { @@ -112,6 +115,7 @@ $px: 0.0625em; .question-piece { @include bubble-drag; @include bubble-inline; + max-width: 608*$px; } .question-piece.disabled { @include bubble-drag-disabled; diff --git a/catalogue/static/catalogue/js/edumed.js b/catalogue/static/catalogue/js/edumed.js index f720aca..b05cc9c 100644 --- a/catalogue/static/catalogue/js/edumed.js +++ b/catalogue/static/catalogue/js/edumed.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.4.0 +// Generated by CoffeeScript 1.3.3 (function() { var $, Binding, EduModule, Exercise, Luki, PrawdaFalsz, Przyporzadkuj, Uporzadkuj, Wybor, Zastap, exercise, __hasProp = {}.hasOwnProperty, @@ -40,8 +40,8 @@ $(this.element).data("exercise-html", $(this.element).html()); $(".check", this.element).click(function(ev) { _this.check(); - $(ev.target).next(".retry").show(); - return $(ev.target).hide(); + $(".retry", _this.element).show(); + return $(".check", _this.element).hide(); }); $(".retry", this.element).click(function(ev) { return _this.retry(); @@ -364,18 +364,17 @@ Luki.prototype.check = function() { var all, correct, _this = this; - all = 0; + all = $(".placeholder", this.element).length; correct = 0; $(".placeholder + .question-piece", this.element).each(function(i, qpiece) { var $placeholder; $placeholder = $(qpiece).prev(".placeholder"); if ($placeholder.data('solution') === $(qpiece).data('no')) { _this.piece_correct(qpiece); - correct += 1; + return correct += 1; } else { - _this.piece_incorrect(qpiece); + return _this.piece_incorrect(qpiece); } - return all += 1; }); return this.show_score([correct, all]); };