Skip to content

Commit b15e083

Browse files
committed
make practice chapter real links
1 parent 81ecfeb commit b15e083

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/analyse/src/study/practice/studyPracticeView.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,10 @@ module.exports = {
9898
config: function(el, isUpdate) {
9999
if (!isUpdate)
100100
el.addEventListener('click', function(e) {
101+
e.preventDefault();
101102
var id = e.target.parentNode.getAttribute('data-id') || e.target.getAttribute('data-id');
102103
if (id) ctrl.setChapter(id);
104+
return false;
103105
});
104106
}
105107
}, [
@@ -108,7 +110,8 @@ module.exports = {
108110
var active = !ctrl.vm.loading && current && current.id === chapter.id;
109111
var completion = data.completion[chapter.id] ? 'done' : 'ongoing';
110112
return [
111-
m('div', {
113+
m('a', {
114+
href: data.url + '/' + chapter.id,
112115
key: chapter.id,
113116
'data-id': chapter.id,
114117
class: 'elem chapter ' + classSet({

0 commit comments

Comments
 (0)