Remove .chanlist wrapper

Added in 04046719c1, but it's not necessary
This commit is contained in:
Pavel Djundik 2018-03-04 20:28:37 +02:00
parent 589d7a9811
commit 73755ce973
4 changed files with 9 additions and 10 deletions

View file

@ -9,7 +9,7 @@ const sidebar = $("#sidebar");
socket.on("join", function(data) {
const id = data.network;
const network = sidebar.find(`#network-${id}-chanlist`);
const network = sidebar.find(`#network-${id}`);
network.append(
templates.chan({
channels: [data.chan],

View file

@ -7,7 +7,7 @@ const sidebar = $("#sidebar");
socket.on("quit", function(data) {
const id = data.network;
const network = sidebar.find(`#network-${id}-chanlist`);
const network = sidebar.find(`#network-${id}`);
network.children(".chan").each(function() {
// this = child

View file

@ -24,12 +24,12 @@ socket.on("sync_sort", function(data) {
return true; // No point in continuing
}
const network = container.find(`#network-${data.target}-chanlist`);
const network = container.find(`#network-${data.target}`);
$(network).insertBefore(position);
});
} else if (type === "channels") {
const network = $(`#network-${data.target}-chanlist`);
const network = $(`#network-${data.target}`);
$.each(order, function(index, value) {
if (index === 0) { // Shouldn't attempt to move lobby

View file

@ -5,12 +5,11 @@
data-id="{{id}}"
data-nick="{{nick}}"
data-options="{{tojson serverOptions}}"
role="region"
>
<div id="network-{{id}}-chanlist" role="region" class="chanlist">
<button class="collapse-network" aria-label="Collapse" data-id="{{id}}"
aria-controls="network-{{id}}-chanlist" aria-expanded="true">
</button>
{{> chan}}
</div>
<button class="collapse-network" aria-label="Collapse" data-id="{{id}}"
aria-controls="network-{{id}}" aria-expanded="true">
</button>
{{> chan}}
</section>
{{/each}}