X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f7c25489e2c521e0cbcf86d8b75a88bd880c9602..a980dc9ed36f367a04dfdc56e277375d9cca1bd1:/redakcja/static/edumed/js/edumed.js?ds=sidebyside diff --git a/redakcja/static/edumed/js/edumed.js b/redakcja/static/edumed/js/edumed.js index 1886b38b..a99377de 100644 --- a/redakcja/static/edumed/js/edumed.js +++ b/redakcja/static/edumed/js/edumed.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var $, Binding, EduModule, Exercise, Luki, PrawdaFalsz, Przyporzadkuj, Uporzadkuj, Wybor, Zastap, exercise, __hasProp = {}.hasOwnProperty, @@ -557,7 +557,7 @@ m = draggables[_j]; $pr = $(".predicate [data-predicate=" + m + "]", question); $ph = $pr.find(".placeholder:visible"); - _results1.push(this.draggable_move($(qp), $ph, this.multiple)); + _results1.push(this.draggable_move($(qp), $ph.eq(0), this.multiple)); } return _results1; }).call(this)); @@ -574,22 +574,23 @@ __extends(PrawdaFalsz, _super); function PrawdaFalsz(element) { - var qp, _i, _len, _ref; + var qp, _i, _len, _ref, + _this = this; PrawdaFalsz.__super__.constructor.call(this, element); _ref = $(".question-piece", this.element); for (_i = 0, _len = _ref.length; _i < _len; _i++) { qp = _ref[_i]; $(".true", qp).click(function(ev) { ev.preventDefault(); - this.retry(); - $(this).closest(".question-piece").data("value", "true"); - return $(this).addClass('chosen').siblings('a').removeClass('chosen'); + _this.retry(); + $(ev.target).closest(".question-piece").data("value", "true"); + return $(ev.target).addClass('chosen').siblings('a').removeClass('chosen'); }); $(".false", qp).click(function(ev) { ev.preventDefault(); - this.retry(); - $(this).closest(".question-piece").data("value", "false"); - return $(this).addClass('chosen').siblings('a').removeClass('chosen'); + _this.retry(); + $(ev.target).closest(".question-piece").data("value", "false"); + return $(ev.target).addClass('chosen').siblings('a').removeClass('chosen'); }); } }