fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
and some more fixes
[redakcja.git]
/
redakcja
/
static
/
edumed
/
js
/
edumed.js
diff --git
a/redakcja/static/edumed/js/edumed.js
b/redakcja/static/edumed/js/edumed.js
index
75ecc9e
..
cc7b9e1
100644
(file)
--- a/
redakcja/static/edumed/js/edumed.js
+++ b/
redakcja/static/edumed/js/edumed.js
@@
-1,6
+1,6
@@
// Generated by CoffeeScript 1.4.0
(function() {
// Generated by CoffeeScript 1.4.0
(function() {
- var $, Binding, EduModule, Ex
cercise, Luki, PrawdaFalsz, Przyporzadkuj, Uporzadkuj, Wybor, Zastap, exc
ercise,
+ var $, Binding, EduModule, Ex
ercise, Luki, PrawdaFalsz, Przyporzadkuj, Uporzadkuj, Wybor, Zastap, ex
ercise,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
@@
-30,14
+30,14
@@
})(Binding);
})(Binding);
- Ex
c
ercise = (function(_super) {
+ Exercise = (function(_super) {
- __extends(Ex
c
ercise, _super);
+ __extends(Exercise, _super);
- function Ex
c
ercise(element) {
+ function Exercise(element) {
var _this = this;
var _this = this;
- Ex
cercise.__super__.constructor.call(this, 'exc
ercise', element);
- $(this.element).data("ex
c
ercise-html", $(this.element).html());
+ Ex
ercise.__super__.constructor.call(this, 'ex
ercise', element);
+ $(this.element).data("exercise-html", $(this.element).html());
$(".check", this.element).click(function(ev) {
_this.check();
$(ev.target).next(".retry").show();
$(".check", this.element).click(function(ev) {
_this.check();
$(ev.target).next(".retry").show();
@@
-57,20
+57,20
@@
});
}
});
}
- Ex
c
ercise.prototype.reset = function() {
- $(this.element).html($(this.element).data('ex
c
ercise-html'));
- return ex
c
ercise(this.element);
+ Exercise.prototype.reset = function() {
+ $(this.element).html($(this.element).data('exercise-html'));
+ return exercise(this.element);
};
};
- Ex
c
ercise.prototype.piece_correct = function(qpiece) {
+ Exercise.prototype.piece_correct = function(qpiece) {
return $(qpiece).removeClass('incorrect').addClass('correct');
};
return $(qpiece).removeClass('incorrect').addClass('correct');
};
- Ex
c
ercise.prototype.piece_incorrect = function(qpiece) {
+ Exercise.prototype.piece_incorrect = function(qpiece) {
return $(qpiece).removeClass('correct').addClass('incorrect');
};
return $(qpiece).removeClass('correct').addClass('incorrect');
};
- Ex
c
ercise.prototype.check = function() {
+ Exercise.prototype.check = function() {
var score, scores,
_this = this;
scores = [];
var score, scores,
_this = this;
scores = [];
@@
-85,7
+85,7
@@
return this.show_score(score);
};
return this.show_score(score);
};
- Ex
c
ercise.prototype.show_solutions = function() {
+ Exercise.prototype.show_solutions = function() {
var _this = this;
this.reset();
return $(".question", this.element).each(function(i, question) {
var _this = this;
this.reset();
return $(".question", this.element).each(function(i, question) {
@@
-93,7
+93,7
@@
});
};
});
};
- Ex
c
ercise.prototype.get_value_list = function(elem, data_key, numbers) {
+ Exercise.prototype.get_value_list = function(elem, data_key, numbers) {
var vl;
vl = $(elem).attr("data-" + data_key).split(/[ ,]+/).map($.trim);
if (numbers) {
var vl;
vl = $(elem).attr("data-" + data_key).split(/[ ,]+/).map($.trim);
if (numbers) {
@@
-104,7
+104,7
@@
return vl;
};
return vl;
};
- Ex
c
ercise.prototype.get_value_optional_list = function(elem, data_key) {
+ Exercise.prototype.get_value_optional_list = function(elem, data_key) {
var mandat, opt, v, vals, _i, _len;
vals = this.get_value_list(elem, data_key);
mandat = [];
var mandat, opt, v, vals, _i, _len;
vals = this.get_value_list(elem, data_key);
mandat = [];
@@
-120,15
+120,15
@@
return [mandat, opt];
};
return [mandat, opt];
};
- Ex
c
ercise.prototype.show_score = function(score) {
+ Exercise.prototype.show_score = function(score) {
return $(".message", this.element).text("Wynik: " + score[0] + " / " + score[1]);
};
return $(".message", this.element).text("Wynik: " + score[0] + " / " + score[1]);
};
- Ex
c
ercise.prototype.draggable_equal = function($draggable1, $draggable2) {
+ Exercise.prototype.draggable_equal = function($draggable1, $draggable2) {
return false;
};
return false;
};
- Ex
c
ercise.prototype.draggable_accept = function($draggable, $droppable) {
+ Exercise.prototype.draggable_accept = function($draggable, $droppable) {
var d, dropped, _i, _len;
dropped = $droppable.closest("ul, ol").find(".draggable");
for (_i = 0, _len = dropped.length; _i < _len; _i++) {
var d, dropped, _i, _len;
dropped = $droppable.closest("ul, ol").find(".draggable");
for (_i = 0, _len = dropped.length; _i < _len; _i++) {
@@
-140,7
+140,7
@@
return true;
};
return true;
};
- Ex
c
ercise.prototype.draggable_move = function($draggable, $placeholder, ismultiple) {
+ Exercise.prototype.draggable_move = function($draggable, $placeholder, ismultiple) {
var $added,
_this = this;
$added = $draggable.clone();
var $added,
_this = this;
$added = $draggable.clone();
@@
-162,7
+162,7
@@
});
};
});
};
- Ex
c
ercise.prototype.dragging = function(ismultiple, issortable) {
+ Exercise.prototype.dragging = function(ismultiple, issortable) {
var _this = this;
return $(".question", this.element).each(function(i, question) {
var draggable_opts, self;
var _this = this;
return $(".question", this.element).each(function(i, question) {
var draggable_opts, self;
@@
-204,7
+204,7
@@
});
};
});
};
- return Ex
c
ercise;
+ return Exercise;
})(Binding);
})(Binding);
@@
-269,7
+269,7
@@
return Wybor;
return Wybor;
- })(Ex
c
ercise);
+ })(Exercise);
Uporzadkuj = (function(_super) {
Uporzadkuj = (function(_super) {
@@
-329,7
+329,7
@@
return Uporzadkuj;
return Uporzadkuj;
- })(Ex
c
ercise);
+ })(Exercise);
Luki = (function(_super) {
Luki = (function(_super) {
@@
-370,7
+370,7
@@
return Luki;
return Luki;
- })(Ex
c
ercise);
+ })(Exercise);
Zastap = (function(_super) {
Zastap = (function(_super) {
@@
-461,7
+461,7
@@
return Zastap;
return Zastap;
- })(Ex
c
ercise);
+ })(Exercise);
Przyporzadkuj = (function(_super) {
Przyporzadkuj = (function(_super) {
@@
-553,7
+553,7
@@
return Przyporzadkuj;
return Przyporzadkuj;
- })(Ex
c
ercise);
+ })(Exercise);
PrawdaFalsz = (function(_super) {
PrawdaFalsz = (function(_super) {
@@
-614,9
+614,9
@@
return PrawdaFalsz;
return PrawdaFalsz;
- })(Ex
c
ercise);
+ })(Exercise);
- ex
c
ercise = function(ele) {
+ exercise = function(ele) {
var cls, es;
es = {
wybor: Wybor,
var cls, es;
es = {
wybor: Wybor,
@@
-636,8
+636,8
@@
$(document).ready(function() {
new EduModule($("#book-text"));
$(document).ready(function() {
new EduModule($("#book-text"));
- return $(".ex
c
ercise").each(function(i, el) {
- return ex
c
ercise(this);
+ return $(".exercise").each(function(i, el) {
+ return exercise(this);
});
});
});
});