simple onClick listener for server buttons
This commit is contained in:
parent
22998a8119
commit
0c4c8e9b75
@ -38,13 +38,7 @@ exports.build_server_list = function (config, dom_id) {
|
|||||||
'classList': ['btn', 'btn-outline-secondary', 'btn-nav-settings'],
|
'classList': ['btn', 'btn-outline-secondary', 'btn-nav-settings'],
|
||||||
'textContent': server['name'],
|
'textContent': server['name'],
|
||||||
'type': 'button',
|
'type': 'button',
|
||||||
'onClick': channels.get_channels(id, server['port'])
|
'onClick': channels.get_channels(server)
|
||||||
})
|
|
||||||
// Why not jquery? because it doesn't write to the node's attributes itself
|
|
||||||
// for some reason
|
|
||||||
child.addEventListener('click', function() {
|
|
||||||
// NOTE: at some point /invite/<code> will be handled on port
|
|
||||||
channels.get_channels(server['domain'], server['port'])
|
|
||||||
})
|
})
|
||||||
|
|
||||||
container.appendChild(child)
|
container.appendChild(child)
|
||||||
|
Loading…
Reference in New Issue
Block a user