Mercurial > xmpp-account-manager
comparison client.js @ 12:139b223dafb0
Actually remove all of the extra data on disconnect.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 22 Dec 2018 16:27:49 +0100 |
parents | e47b9bd55192 |
children | 8724e28ccbd7 |
comparison
equal
deleted
inserted
replaced
11:aedf80eefc19 | 12:139b223dafb0 |
---|---|
105 { | 105 { |
106 connect_button.value = 'connect'; | 106 connect_button.value = 'connect'; |
107 jid_element.disabled = false; | 107 jid_element.disabled = false; |
108 pass_element.disabled = false; | 108 pass_element.disabled = false; |
109 spinner_img.hidden = true; | 109 spinner_img.hidden = true; |
110 for (let item of document.getElementById('roster-table')) { | 110 connected_div.hidden = true; |
111 item.remove(); | 111 let table = document.getElementById('roster-table'); |
112 while (table.hasChildNodes()) { | |
113 table.removeChild(table.lastChild); | |
112 } | 114 } |
113 for (let item of document.getElementById('pep-table')) { | 115 table = document.getElementById('pep-table'); |
114 item.remove(); | 116 while (table.hasChildNodes()) { |
117 table.removeChild(table.lastChild); | |
115 } | 118 } |
116 } | 119 } |
117 }); | 120 }); |