for m in draggables
$pr = $(".predicate [data-predicate=" + m + "]", question)
$ph = $pr.find ".placeholder:visible"
- @draggable_move $(qp), $ph, @multiple
+ @draggable_move $(qp), $ph.eq(0), @multiple
super element
for qp in $(".question-piece", @element)
- $(".true", qp).click (ev) ->
+ $(".true", qp).click (ev) =>
ev.preventDefault()
@retry()
- $(this).closest(".question-piece").data("value", "true")
- $(this).addClass('chosen').siblings('a').removeClass('chosen')
- $(".false", qp).click (ev) ->
+ $(ev.target).closest(".question-piece").data("value", "true")
+ $(ev.target).addClass('chosen').siblings('a').removeClass('chosen')
+ $(".false", qp).click (ev) =>
ev.preventDefault()
@retry()
- $(this).closest(".question-piece").data("value", "false")
- $(this).addClass('chosen').siblings('a').removeClass('chosen')
+ $(ev.target).closest(".question-piece").data("value", "false")
+ $(ev.target).addClass('chosen').siblings('a').removeClass('chosen')
check_question: ->
-// 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,
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));
__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');
});
}
}