comparison pep.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 5aa1bf7154b0
children af2874ff7234
comparison
equal deleted inserted replaced
37:44ebcf732706 38:c2e2b107c7c1
59 td.appendChild(input); 59 td.appendChild(input);
60 tr.appendChild(td); 60 tr.appendChild(td);
61 } 61 }
62 const td = document.createElementNS('http://www.w3.org/1999/xhtml', 'td'); 62 const td = document.createElementNS('http://www.w3.org/1999/xhtml', 'td');
63 const button = document.createElementNS('http://www.w3.org/1999/xhtml', 'button'); 63 const button = document.createElementNS('http://www.w3.org/1999/xhtml', 'button');
64 button.textContent = 'Delete this node'; 64 button.classList.add('btn');
65 button.classList.add('btn-danger');
66 button.textContent = '✕';
65 button.onclick = function (evt) { 67 button.onclick = function (evt) {
66 const iq = $iq({type: 'set'}) 68 const iq = $iq({type: 'set'})
67 .c('pubsub', {xmlns: NS.pubsub_owner}) 69 .c('pubsub', {xmlns: NS.pubsub_owner})
68 .c('delete', {node: node}); 70 .c('delete', {node: node});
69 connection.sendIQ(iq, onNodeDeleted.bind(node), onNodeDeletionError.bind(node, 'PEP node deletion failed.')); 71 connection.sendIQ(iq, onNodeDeleted.bind(node), onNodeDeletionError.bind(node, 'PEP node deletion failed.'));