mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +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) {
|
socket.on("join", function(data) {
|
||||||
const id = data.network;
|
const id = data.network;
|
||||||
const network = sidebar.find(`#network-${id}-chanlist`);
|
const network = sidebar.find(`#network-${id}`);
|
||||||
network.append(
|
network.append(
|
||||||
templates.chan({
|
templates.chan({
|
||||||
channels: [data.chan],
|
channels: [data.chan],
|
||||||
|
|
|
@ -7,7 +7,7 @@ const sidebar = $("#sidebar");
|
||||||
|
|
||||||
socket.on("quit", function(data) {
|
socket.on("quit", function(data) {
|
||||||
const id = data.network;
|
const id = data.network;
|
||||||
const network = sidebar.find(`#network-${id}-chanlist`);
|
const network = sidebar.find(`#network-${id}`);
|
||||||
|
|
||||||
network.children(".chan").each(function() {
|
network.children(".chan").each(function() {
|
||||||
// this = child
|
// this = child
|
||||||
|
|
|
@ -24,12 +24,12 @@ socket.on("sync_sort", function(data) {
|
||||||
return true; // No point in continuing
|
return true; // No point in continuing
|
||||||
}
|
}
|
||||||
|
|
||||||
const network = container.find(`#network-${data.target}-chanlist`);
|
const network = container.find(`#network-${data.target}`);
|
||||||
|
|
||||||
$(network).insertBefore(position);
|
$(network).insertBefore(position);
|
||||||
});
|
});
|
||||||
} else if (type === "channels") {
|
} else if (type === "channels") {
|
||||||
const network = $(`#network-${data.target}-chanlist`);
|
const network = $(`#network-${data.target}`);
|
||||||
|
|
||||||
$.each(order, function(index, value) {
|
$.each(order, function(index, value) {
|
||||||
if (index === 0) { // Shouldn't attempt to move lobby
|
if (index === 0) { // Shouldn't attempt to move lobby
|
||||||
|
|
|
@ -5,12 +5,11 @@
|
||||||
data-id="{{id}}"
|
data-id="{{id}}"
|
||||||
data-nick="{{nick}}"
|
data-nick="{{nick}}"
|
||||||
data-options="{{tojson serverOptions}}"
|
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}}"
|
||||||
<button class="collapse-network" aria-label="Collapse" data-id="{{id}}"
|
aria-controls="network-{{id}}" aria-expanded="true">
|
||||||
aria-controls="network-{{id}}-chanlist" aria-expanded="true">
|
</button>
|
||||||
</button>
|
{{> chan}}
|
||||||
{{> chan}}
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
Loading…
Reference in a new issue