From cf8a573be6af7f94e71d336f3faca2a282614693 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Wed, 9 Jan 2013 17:24:22 +0100 Subject: [PATCH 1/1] use attr instead of data --- redakcja/static/edumed/js/edumed.coffee | 2 +- redakcja/static/edumed/js/edumed.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.20.1