From: Marcin Koziej Date: Wed, 9 Jan 2013 16:24:22 +0000 (+0100) Subject: use attr instead of data X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/cf8a573be6af7f94e71d336f3faca2a282614693?hp=ca531bd353bd00ebe786c63df893f7f71167411b use attr instead of data --- diff --git a/redakcja/static/edumed/js/edumed.coffee b/redakcja/static/edumed/js/edumed.coffee index 84fb91f1..adc3ae56 100644 --- a/redakcja/static/edumed/js/edumed.coffee +++ b/redakcja/static/edumed/js/edumed.coffee @@ -44,7 +44,7 @@ class Excercise extends Binding @show_score(score) get_value_list: (elem, data_key, numbers) -> - vl = $(elem).data(data_key).split(/[ ,]+/).map($.trim) #.map((x) -> parseInt(x)) + vl = $(elem).attr("data-" + data_key).split(/[ ,]+/).map($.trim) #.map((x) -> parseInt(x)) if numbers vl = vl.map((x) -> parseInt(x)) return vl diff --git a/redakcja/static/edumed/js/edumed.js b/redakcja/static/edumed/js/edumed.js index aec1c4cb..92ab4c1b 100644 --- a/redakcja/static/edumed/js/edumed.js +++ b/redakcja/static/edumed/js/edumed.js @@ -77,7 +77,7 @@ Excercise.prototype.get_value_list = function(elem, data_key, numbers) { var vl; - vl = $(elem).data(data_key).split(/[ ,]+/).map($.trim); + vl = $(elem).attr("data-" + data_key).split(/[ ,]+/).map($.trim); if (numbers) { vl = vl.map(function(x) { return parseInt(x);