mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 14:00:21 +00:00
Fix channels drag'n'droping
This commit is contained in:
parent
5ff1496061
commit
1a4974b7df
2 changed files with 8 additions and 3 deletions
|
@ -409,6 +409,7 @@ button {
|
|||
text-align: left;
|
||||
transition: color .2s;
|
||||
width: 180px;
|
||||
left: auto !important; /* Fix for drag'n'drop not recalculating left position */
|
||||
}
|
||||
|
||||
#sidebar .chan-placeholder {
|
||||
|
|
|
@ -1245,15 +1245,17 @@ $(function() {
|
|||
}
|
||||
|
||||
function sortable() {
|
||||
sidebar.sortable({
|
||||
sidebar.find(".networks").sortable({
|
||||
axis: "y",
|
||||
containment: "parent",
|
||||
cursor: "grabbing",
|
||||
cursor: "move",
|
||||
distance: 12,
|
||||
items: ".network",
|
||||
handle: ".lobby",
|
||||
placeholder: "network-placeholder",
|
||||
forcePlaceholderSize: true,
|
||||
tolerance: "pointer", // Use the pointer to figure out where the network is in the list
|
||||
|
||||
update: function() {
|
||||
var order = [];
|
||||
sidebar.find(".network").each(function() {
|
||||
|
@ -1271,11 +1273,13 @@ $(function() {
|
|||
sidebar.find(".network").sortable({
|
||||
axis: "y",
|
||||
containment: "parent",
|
||||
cursor: "grabbing",
|
||||
cursor: "move",
|
||||
distance: 12,
|
||||
items: ".chan:not(.lobby)",
|
||||
placeholder: "chan-placeholder",
|
||||
forcePlaceholderSize: true,
|
||||
tolerance: "pointer", // Use the pointer to figure out where the channel is in the list
|
||||
|
||||
update: function(e, ui) {
|
||||
var order = [];
|
||||
var network = ui.item.parent();
|
||||
|
|
Loading…
Reference in a new issue