mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
parent
589d7a9811
commit
73755ce973
4 changed files with 9 additions and 10 deletions
|
@ -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],
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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">
|
||||
aria-controls="network-{{id}}" aria-expanded="true">
|
||||
</button>
|
||||
{{> chan}}
|
||||
</div>
|
||||
</section>
|
||||
{{/each}}
|
||||
|
|
Loading…
Reference in a new issue