Mercurial > xmpp-account-manager
comparison roster.js @ 57:427807059ca8
Use `` in JS for templating, and add two forgotten strings.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 24 May 2020 12:51:07 +0200 |
parents | 010b905a74d4 |
children | 6d861d881b96 |
comparison
equal
deleted
inserted
replaced
56:010b905a74d4 | 57:427807059ca8 |
---|---|
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.classList.add('btn'); | 54 button.classList.add('btn'); |
55 button.classList.add('btn-danger'); | 55 button.classList.add('btn-danger'); |
56 button.textContent = '✕'; | 56 button.textContent = '✕'; |
57 button.onclick = function (evt) { | 57 button.onclick = function (evt) { |
58 const really = confirm('{% trans 'Do you really want to remove {}?' %}'.replace('{}', jid)); | 58 const really = confirm(`{% trans 'Do you really want to remove ${jid}?' %}`); |
59 if (!really) | 59 if (!really) |
60 return; | 60 return; |
61 const iq = $iq({type: 'set'}) | 61 const iq = $iq({type: 'set'}) |
62 .c('query', {xmlns: NS.roster}) | 62 .c('query', {xmlns: NS.roster}) |
63 .c('item', {jid: jid, subscription: 'unsubscribe'}); | 63 .c('item', {jid: jid, subscription: 'unsubscribe'}); |