Commit 7ae735c4 authored by JC Brand's avatar JC Brand

Better naming and wrap lines

parent 8dae284e
...@@ -2371,8 +2371,8 @@ ...@@ -2371,8 +2371,8 @@
} else if (index === (this.model.length-1)) { } else if (index === (this.model.length-1)) {
list.insertAdjacentElement('beforeend', view.el); list.insertAdjacentElement('beforeend', view.el);
} else { } else {
const neighbour = list.querySelector('li:nth-child('+index+')'); const neighbour_el = list.querySelector('li:nth-child('+index+')');
neighbour.insertAdjacentElement('afterend', view.el); neighbour_el.insertAdjacentElement('afterend', view.el);
} }
return view; return view;
}, },
...@@ -2662,12 +2662,14 @@ ...@@ -2662,12 +2662,14 @@
if (this.rooms.length) { if (this.rooms.length) {
// For translators: %1$s is a variable and will be // For translators: %1$s is a variable and will be
// replaced with the XMPP server name // replaced with the XMPP server name
available_chatrooms.innerHTML = `<dt>${__('Rooms on %1$s',this.model.get('muc_domain'))}</dt>`; available_chatrooms.innerHTML =
`<dt>${__('Rooms on %1$s',this.model.get('muc_domain'))}</dt>`;
const div = document.createElement('div'); const div = document.createElement('div');
const fragment = document.createDocumentFragment(); const fragment = document.createDocumentFragment();
for (let i=0; i<this.rooms.length; i++) { for (let i=0; i<this.rooms.length; i++) {
const name = Strophe.unescapeNode( const name = Strophe.unescapeNode(
this.rooms[i].getAttribute('name') || this.rooms[i].getAttribute('jid') this.rooms[i].getAttribute('name') ||
this.rooms[i].getAttribute('jid')
); );
div.innerHTML = tpl_room_item({ div.innerHTML = tpl_room_item({
'name': name, 'name': name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment