.uporzadkuj .lista {
list-style: none;
margin: 0;
- padding: 0; }
+ padding: 0;
+ counter-reset: answer; }
+ .uporzadkuj .lista li {
+ counter-increment: answer;
+ padding-right: 3em;
+ background-image: url(/static/img/ornaments/draggable.png);
+ background-repeat: no-repeat;
+ background-position: 100% 50%; }
+ .uporzadkuj .lista li:before {
+ border-radius: 0.688em;
+ padding: 0.5em 0.688em;
+ background-color: #d4d6d8;
+ color: #363a3e;
+ cursor: pointer;
+ z-index: 2;
+ content: counter(answer);
+ float: left;
+ margin: -0.5em 0 0 -3em; }
+ .uporzadkuj .lista li.ui-sortable-placeholder {
+ counter-increment: answer 0; }
+ .uporzadkuj .lista li.ui-sortable-helper:before {
+ content: none; }
.przyporzadkuj .question-piece {
background-color: #d4d6d8;
}
.lista {
@include list-plain;
+ counter-reset: answer;
+ li {
+ counter-increment: answer;
+ padding-right: 3em;
+ background-image: url(/static/img/ornaments/draggable.png);
+ background-repeat: no-repeat;
+ background-position: 100% 50%;
+ }
+ li:before {
+ @include bubble;
+ @include bubble-drag;
+ content: counter(answer);
+ float: left;
+ margin: -.5em 0 0 -3em;
+ }
+ li.ui-sortable-placeholder {
+ counter-increment: answer 0;
+ }
+ li.ui-sortable-helper:before {
+ content: none;
+ }
}
}
-// 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,
return $(ev.target).hide();
});
$(".retry", this.element).click(function(ev) {
- $(".correct, .incorrect", _this.element).removeClass("correct incorrect");
- $(ev.target).prev(".check").show();
- return $(ev.target).hide();
+ return _this.retry();
});
$('.solutions', this.element).click(function() {
_this.show_solutions();
});
}
+ Exercise.prototype.retry = function() {
+ $(".correct, .incorrect", this.element).removeClass("correct incorrect");
+ $(".check", this.element).show();
+ return $(".retry", this.element).hide();
+ };
+
Exercise.prototype.reset = function() {
$(this.element).html($(this.element).data('exercise-html'));
return exercise(this.element);
var draggable_opts, self;
draggable_opts = {
revert: 'invalid',
- helper: 'clone'
+ helper: 'clone',
+ start: _this.retry
};
$(".draggable", question).draggable(draggable_opts);
self = _this;
function Wybor(element) {
Wybor.__super__.constructor.call(this, element);
+ $(".question-piece input", element).change(this.retry);
}
Wybor.prototype.check_question = function(question) {
function Uporzadkuj(element) {
Uporzadkuj.__super__.constructor.call(this, element);
$('ol, ul', this.element).sortable({
- items: "> li"
+ items: "> li",
+ start: this.retry
});
}
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');
});
$(".false", qp).click(function(ev) {
ev.preventDefault();
+ this.retry();
$(this).closest(".question-piece").data("value", "false");
return $(this).addClass('chosen').siblings('a').removeClass('chosen');
});