From: Marcin Koziej Date: Wed, 13 Feb 2013 14:17:42 +0000 (+0100) Subject: data() sometimes creates numbers and sometimes strings... X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/c37f013998c68de1d65ed6c551aedaac83d69754?ds=sidebyside;hp=723f0aeedb81b9aabb213d5e8b74653e73a9eb38 data() sometimes creates numbers and sometimes strings... --- diff --git a/redakcja/static/edumed/js/edumed.coffee b/redakcja/static/edumed/js/edumed.coffee index 4cf17aac..e8762ec5 100644 --- a/redakcja/static/edumed/js/edumed.coffee +++ b/redakcja/static/edumed/js/edumed.coffee @@ -375,7 +375,7 @@ class Zastap extends Exercise class Przyporzadkuj extends Exercise is_multiple: -> for qp in $(".question-piece", @element) - if $(qp).data('solution').split(/[ ,]+/).length > 1 + if $(qp).attr('data-solution').split(/[ ,]+/).length > 1 return true return false diff --git a/redakcja/static/edumed/js/edumed.js b/redakcja/static/edumed/js/edumed.js index 2c5e3083..17d485f8 100644 --- a/redakcja/static/edumed/js/edumed.js +++ b/redakcja/static/edumed/js/edumed.js @@ -493,7 +493,7 @@ _ref = $(".question-piece", this.element); for (_i = 0, _len = _ref.length; _i < _len; _i++) { qp = _ref[_i]; - if ($(qp).data('solution').split(/[ ,]+/).length > 1) { + if ($(qp).attr('data-solution').split(/[ ,]+/).length > 1) { return true; } }