Mercurial > xmpp-account-manager
comparison roster.js @ 38:c2e2b107c7c1
Commit changes from the July 2019 Lyon sprint.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 23 May 2020 17:59:09 +0200 |
parents | 45bd945c5722 |
children | af2874ff7234 |
comparison
equal
deleted
inserted
replaced
37:44ebcf732706 | 38:c2e2b107c7c1 |
---|---|
49 td.appendChild(span); | 49 td.appendChild(span); |
50 } | 50 } |
51 tr.appendChild(td); | 51 tr.appendChild(td); |
52 td = document.createElementNS('http://www.w3.org/1999/xhtml', 'td'); | 52 td = document.createElementNS('http://www.w3.org/1999/xhtml', 'td'); |
53 const button = document.createElementNS('http://www.w3.org/1999/xhtml', 'button'); | 53 const button = document.createElementNS('http://www.w3.org/1999/xhtml', 'button'); |
54 button.textContent = 'Remove this contact'; | 54 button.classList.add('btn'); |
55 button.classList.add('btn-danger'); | |
56 button.textContent = '✕'; | |
55 button.onclick = function (evt) { | 57 button.onclick = function (evt) { |
56 const iq = $iq({type: 'set'}) | 58 const iq = $iq({type: 'set'}) |
57 .c('query', {xmlns: NS.roster}) | 59 .c('query', {xmlns: NS.roster}) |
58 .c('item', {jid: jid, subscription: 'unsubscribe'}); | 60 .c('item', {jid: jid, subscription: 'unsubscribe'}); |
59 connection.sendIQ(iq, onRosterSet.bind(node), onRosterSetError.bind(node, 'contact removal failed.')); | 61 connection.sendIQ(iq, onRosterSet.bind(node), onRosterSetError.bind(node, 'contact removal failed.')); |