Skip to content
Snippets Groups Projects
Commit 79fe58fe authored by Elias Asikainen's avatar Elias Asikainen
Browse files

on click for studydocs

parent 5022e498
No related branches found
No related tags found
1 merge request!47Listview
......@@ -59,27 +59,27 @@ export default class studydocList {
),
m( 'div.content',[
m('table', [
m('thead', m('tr', tableHeadings.map(header => m('th', header)))),
m(
'tbody',
studydocs
.getList()
.map(doc =>
m('tr', [
m('td', doc.title),
m('td', doc.lecture),
m('td', doc.professor),
m('td', doc.semester),
m('td', doc.author),
m(
'td',
doc.files.map(item =>
m('a', { href: `${apiUrl}${item.file}`, target: '_blank' }, item.name)
)
),
])
)
),
m('thead',
m('tr', tableHeadings.map(header => m('th', header)))),
m('tbody',
studydocs
.getList()
.map(doc =>
m('tr', {onclick:alert('You clicked me !')},[
m('td', doc.title),
m('td', doc.lecture),
m('td', doc.professor),
m('td', doc.semester),
m('td', doc.author),
m(
'td',
doc.files.map(item =>
m('a', { href: `${apiUrl}${item.file}`, target: '_blank' }, item.name)
)
),
])
)
),
]),
]),
m('div.details',[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment