jQueryUI无嵌套可排序多个列表

jQueryUI无嵌套可排序多个列表,jquery,jquery-ui,jquery-ui-sortable,Jquery,Jquery Ui,Jquery Ui Sortable,我拥有的 我有一个使用PHP、Ajax和Jquery动态加载用户的日历。 用户和标题由网格布局预定义 例如: <tr>Team 1</tr> <tr>User A</tr> <tr>User B</tr> <tr>Team 2</tr> <tr>User A</tr> <tr>User B</tr> 1

我拥有的

我有一个使用PHP、Ajax和Jquery动态加载用户的日历。 用户和标题由网格布局预定义

例如:

    <tr>Team 1</tr> 
    <tr>User A</tr>
    <tr>User B</tr>
    <tr>Team 2</tr>
    <tr>User A</tr>
    <tr>User B</tr>
1个用户组的工作代码段:

$('.cal tbody')。可排序({
句柄:'.cal用户移动',
开始:功能(e、ui){
$(ui.item).css('background-color','eaecee');
$(ui.item).css('z-index','10040');
},
助手:函数(e、ui){
ui.children().each(函数()){
$(this.width($(this.width());
});
返回用户界面;
},
占位符:“cal排序用户”,
项目:“tr[数据组='1']”,
停止:功能(e、ui){
$(ui.item).css('background-color','');
$(ui.item.css('z-index','');
}
}).disableSelection()
/*缩小,因为它与问题无关*/
.test{height:25px;width:25px;lineheight:25px;top:0;right:-24px;position:absolute;background color:#fff;color:#ff8e00;text align:center;font size:13px;box shadow:1px 1px 3px#b5b5b5b5b5;cursor:pointer}。test:hover{color:#fff;background color:#ff8e00}。table td.{th padding:5px!重要子项}第一个位置:左:30;索引}td:first child{position:sticky;left:0;z-index:10010}和th{position:sticky;top:0;z-index:10020}。cal容器{max width:900px;max height:500px;溢出:auto;margin:auto}。cal表{position position:relative;border:solid#ebebebebebebebebebebebebebebeb;border width:0 1px0;overcroll行为:contain}。cal thead{top:0;box shadow:0;box shadow:0 10px 50px rgba(0,0,0,0,0.04)}。cal{字体大小:16px;背景:#fdfdfdfd;宽度:150px;高度:50px}.cal toprow{宽度:182px;最小宽度:182px;颜色:#3e5569;背景颜色:#f7f9fb!重要;边框:1px实心#ebebebebebebebeb!重要}.cal toprow.cal viewmonth{字体重量:700!重要;文本对齐:中心;垂直对齐:中间!重要}.cal userinfo高度:70px;方框阴影:20px(50px,0,0,0)}.cal tbody.cal userinfo{最小宽度:150px!重要;文本对齐:右;颜色:#60666b;字体重量:600;字体大小:12px;字母间距:.03em;背景:#fdfdfdfd;填充:.3em;边框:1px实心#ebebebebeb}。cal usersheader{高度:20px;方框阴影:20px 0 50px rgba(0,0,0.05);最小宽度:150px!重要;文本对齐:中心;字体重量:700;字体大小:15px;字母间距:.03em;填充:.3em}。详细信息{边框半径:4px;背景:#fff;方框阴影:0 10px 40px rgba(0,0,0,0.08);边框:1px实心#ebecee;填充:0 5px 10px;边距:2px;z索引:1}。详细信息uren{font size:12px;color:#333;font-weight:500;边距:0;right:0;文本对齐:right;padding right:10px}.details任务{margin top:5px;边距底部:2px;font-size:12px;padding:2px 5px;font-weight:600;线宽:1.4;边框半径:2px;宽度:94%}.cal用户移动{bottomer:0;边距左侧:5px;位置:绝对;颜色:18px;光标:指针}.cal用户移动:悬停{color:#1e895a}.cal排序用户{边框:2px虚线#999;背景:#ede8e8;高度:85px}

朱莉2020
星期三1
星期四2
星期五3
星期六4
星期日5
第一队
范埃尔斯努曼
训练
15:00 - 16:30
白班
00:00 - 00:00
生病的
00:00 - 00:00
晚班
07:30 - 16:30
假期
00:00 - 00:00
亨森苏珊娜
晚班
11:00 - 18:00
晚班
17:00 - 00:00
加班
21:00 - 04:00
假期
00:00 - 00:00
第二小组
马克洛曼
晚班
12:00 - 19:00
晚班
05:00 - 12:00
晚班
07:00 - 14:00
休息
00:00 - 00:00
范埃尔斯努曼
训练
15:00 - 16:30
白班
00:00 - 00:00
生病的
00:00 - 00:00
    items: function(e, ui) {
        var d = 'tr[data-group="'+ $(ui.item).attr('data-group') +' "] ';
        return d;
    },
if (ui.item.attr('data-group') != ui.item.prev().attr('data-group')) {
$(this).sortable('cancel');