1
This commit is contained in:
parent
a7265a6df9
commit
786c309a64
@ -28,9 +28,9 @@
|
||||
<script src="./src/comboTreePlugin.js" type="text/javascript"></script>
|
||||
|
||||
<script src="./src/jquery.dad.min.js" type="text/javascript"></script>
|
||||
<!-- 拖动插件 -->
|
||||
<script src="./src/jquery.nestable.js" type="text/javascript"></script>
|
||||
|
||||
<!-- 拖动插件 -->
|
||||
<script src="./src/Sortable.js" type="text/javascript"></script>
|
||||
|
||||
<!-- table -->
|
||||
<script src="./src/FixedTable.js" type="text/javascript"></script>
|
||||
|
@ -304,220 +304,11 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="layui-footer modify-layui-footer">
|
||||
底部固定区域
|
||||
© layui.com - 底部固定区域
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Screen"></div>
|
||||
|
||||
<!-- 导航操作弹窗 -->
|
||||
<!-- <div class="TabOperation_box" id="TabOperation_box">
|
||||
<ul id="TabOperation">
|
||||
<li>
|
||||
<img src="./static/img/xiugai.png"/>
|
||||
<span>重新命名</span>
|
||||
</li>
|
||||
<li>
|
||||
<img src="./static/img/yidong.png"/>
|
||||
<span>移动至</span>
|
||||
</li>
|
||||
<li>
|
||||
<img src="./static/img/fuzhi.png"/>
|
||||
<span>复制看板</span>
|
||||
</li>
|
||||
<li>
|
||||
<img src="./static/img/del.png"/>
|
||||
<span>删除看板</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div> -->
|
||||
|
||||
<!-- 修改看板名称 -->
|
||||
<!-- <div class="modifyname-bg">
|
||||
<div class="modifyname-box">
|
||||
<div class="modifyname-top">
|
||||
<p>看板名称</p>
|
||||
<img src="./static/img/cha.png" id="modifyname-cha"/>
|
||||
</div>
|
||||
<input id="modifynameid" style="display: none;">
|
||||
<div class="modifyname-txt-box">
|
||||
<input type="text" class="modifyname-txt" id="modifyname-txt"/>
|
||||
</div>
|
||||
<div class="modifyname-but-box">
|
||||
<div class="modifyname-qx" id="modifyname-qx">取消</div>
|
||||
<div class="modifyname-qd" id="modifyname-qd">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- 移动看板 -->
|
||||
<!-- <div class="yidong-bg">
|
||||
<div class="yidong-box">
|
||||
<div class="yidong-top">
|
||||
<p>移动至</p>
|
||||
<img src="./static/img/cha.png" id="yidong-cha"/>
|
||||
</div>
|
||||
<input id="yidongid" style="display: none;">
|
||||
<div class="yidong-tab-box">
|
||||
<div class="yidong-tab">
|
||||
<div class="tabdata" id='yidongkanban' onclick="tabdata('yidongkanban','yidong')">我的看板</div>
|
||||
<div id='yidongkongjian' onclick="tabdata('yidongkongjian','yidong')">项目空间</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yidong-txt-box">
|
||||
<input type="text" class="justAnotherInputBox1" placeholder=""/>
|
||||
<input type="text" class="justAnotherInputBox2" placeholder=""/>
|
||||
</div>
|
||||
<div class="yidong-but-box">
|
||||
<div class="yidong-qx" id="yidong-qx">取消</div>
|
||||
<div class="yidong-qd" id="yidong-qd">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 复制看板 -->
|
||||
<!-- <div class="copy-bg">
|
||||
<div class="copy-box">
|
||||
<div class="copy-top">
|
||||
<p>复制看板</p>
|
||||
<img src="./static/img/cha.png" id="copy-cha"/>
|
||||
</div>
|
||||
<input id="copyid" style="display: none;">
|
||||
<div class="copy-name-box">
|
||||
<div class="copy-title">看板名称</div>
|
||||
<input type="text" class="copyname-txt" id="copyname-txt"/>
|
||||
</div>
|
||||
<div class="copy-tab-box">
|
||||
<div class="copy-title">添加至</div>
|
||||
<div class="copy-tab">
|
||||
<div class="tabdata" id='copykanban' onclick="tabdata('copykanban','copy')">我的看板</div>
|
||||
<div id='copykongjian' onclick="tabdata('copykongjian','copy')">项目空间</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="copy-txt-box">
|
||||
<input type="text" class="justAnotherInputBox1" placeholder=""/>
|
||||
<input type="text" class="justAnotherInputBox2" placeholder=""/>
|
||||
</div>
|
||||
<div class="copy-tishi"> <img src="./static/img/capytishi.png"/> 复制看板将同时复制看板内的报表 </div>
|
||||
<div class="copy-but-box">
|
||||
<div class="copy-qx" id="copy-qx">取消</div>
|
||||
<div class="copy-qd" id="copy-qd">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 删除 -->
|
||||
<!-- <div class="del-bg">
|
||||
<div class="del-box">
|
||||
<div class="del-xinxi">
|
||||
<div class="del-tit"><img src="./static/img/redtishi.png">操作提示</div>
|
||||
<p class="del-tishi">确认删除【<span id="del-tit"></span>】?该操作不可恢复</p>
|
||||
</div>
|
||||
<input id="delid" style="display: none;">
|
||||
<div class="del-but-box">
|
||||
<div class="del-qx" id="del-qx">取消</div>
|
||||
<div class="del-qd" id="del-qd">删除</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 控件设置 -->
|
||||
<!-- <div class="kongjian-bg">
|
||||
<div class="kongjian-box">
|
||||
<div class="chuangjiankongjian-box">
|
||||
<p class="chuangjiankongjian-tit">创建空间</p>
|
||||
<p class="chuangjiankongjian-tit2">选择成员创建共享空间,添加看板至空间实现统一共享</p>
|
||||
</div>
|
||||
<div class="kongjian-mc-box">
|
||||
<span>空间名称</span>
|
||||
<input type="text" placeholder="测试"/>
|
||||
</div>
|
||||
<div class="kongjian-mc-box" style="margin-top: 16px;">
|
||||
<span>空间成员</span>
|
||||
<div class="kongjian-tianjia">+添加</div>
|
||||
</div>
|
||||
<div class="kongjian-renyuan-box">
|
||||
|
||||
</div>
|
||||
<div class="kongjian-but-box">
|
||||
<ul class="layui-nav kongjian-cz">
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">更多操作</a>
|
||||
<dl class="layui-nav-child">
|
||||
<dd><a href="">移交空间</a></dd>
|
||||
<dd><a href="">删除空间</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="kongjian-but">
|
||||
<div class="kongjian-qx" id="kongjian-qx">取消</div>
|
||||
<div class="kongjian-qd" id="kongjian-qd">完成</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 新建看板 -->
|
||||
<!-- <div class="new-bg">
|
||||
<div class="new-box">
|
||||
<div class="new-top">
|
||||
<p>新建看板</p>
|
||||
<img src="./static/img/cha.png" id="new-cha"/>
|
||||
</div>
|
||||
<div class="new-name-box">
|
||||
<div class="new-title">看板名称</div>
|
||||
<input type="text" class="newname-txt" id="newname-txt"/>
|
||||
</div>
|
||||
<div class="new-tab-box">
|
||||
<div class="new-title">添加至</div>
|
||||
<div class="new-tab">
|
||||
<div class="tabdata" id='newkanban' onclick="tabdata('newkanban','new')">我的看板</div>
|
||||
<div id='newkongjian' onclick="tabdata('newkongjian','new')">项目空间</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="new-txt-box">
|
||||
<input type="text" class="justAnotherInputBox1" placeholder=""/>
|
||||
<input type="text" class="justAnotherInputBox2" placeholder=""/>
|
||||
</div>
|
||||
<div class="new-but-box">
|
||||
<div class="new-qx" id="new-qx">取消</div>
|
||||
<div class="new-qd" id="new-qd">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 新建文件夹 -->
|
||||
<!-- <div class="newwenjian-bg">
|
||||
<div class="newwenjian-box">
|
||||
<div class="newwenjian-top">
|
||||
<p>新建文件夹</p>
|
||||
<img src="./static/img/cha.png" id="newwenjian-cha"/>
|
||||
</div>
|
||||
<div class="newwenjian-name-box">
|
||||
<div class="newwenjian-title">文件夹名称</div>
|
||||
<input type="text" class="newwenjianname-txt" id="newwenjianname-txt"/>
|
||||
</div>
|
||||
<div class="newwenjian-tab-box">
|
||||
<div class="newwenjian-title">添加至</div>
|
||||
<div class="newwenjian-tab">
|
||||
<div class="tabdata" id='newwenjiankanban' onclick="tabdata('newwenjiankanban','newwenjian')">我的看板</div>
|
||||
<div id='newwenjiankongjian' onclick="tabdata('newwenjiankongjian','newwenjian')">项目空间</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="newwenjian-txt-box">
|
||||
<input type="text" class="justAnotherInputBox1" placeholder="" style="display: none;"/>
|
||||
<input type="text" class="justAnotherInputBox2" placeholder=""/>
|
||||
</div>
|
||||
<div class="newwenjian-but-box">
|
||||
<div class="newwenjian-qx" id="newwenjian-qx">取消</div>
|
||||
<div class="newwenjian-qd" id="newwenjian-qd">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<script id="layui-project-dot" type="text/html">
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;" class="projecttit"></a>
|
||||
@ -566,43 +357,20 @@
|
||||
<li class="layui-nav-item layui-nav-itemed">
|
||||
<a href="javascript:;" class="fontcolor mykanban category xiangmukongjian" data-id="{{item._id}}">
|
||||
<i class="layui-icon layui-icon-template-1"></i> {{item.name}}
|
||||
<img src="./static/img/renyuan.png" class="nav-space-bar" data-id="{{item._id}}"/></a>
|
||||
<img src="./static/img/renyuan.png" class="nav-space-bar" data-id="{{item._id}}"/>
|
||||
</a>
|
||||
<dl class="layui-nav-child modeify-layui-nav-child" id="sidebar-box">
|
||||
|
||||
{{# layui.each(item.children, function(indexs, items){ }}
|
||||
{{# if(items.onclick == 1){ }}
|
||||
<dd class="layui-left-dd layui-this" data-id="{{items._id}}"><a href="javascript:;" class="fontcolor second category"> <span>{{items.name}}</span>
|
||||
<dd class="layui-left-dd layui-this" data-id="{{items._id}}"><a href="javascript:;" class="fontcolor second category"> <span class="tuodong">{{items.name}}</span>
|
||||
<img src="./static/img/gengduo.png" alt="" class="nav-action-bar" data-id="{{items._id}}"></a>
|
||||
</dd>
|
||||
{{# } else { }}
|
||||
<dd class="layui-left-dd" data-id="{{items._id}}"><a href="javascript:;" class="fontcolor second category"> <span>{{items.name}}</span>
|
||||
<dd class="layui-left-dd" data-id="{{items._id}}"><a href="javascript:;" class="fontcolor second category"> <span class="tuodong">{{items.name}}</span>
|
||||
<img src="./static/img/gengduo.png" alt="" class="nav-action-bar" data-id="{{items._id}}"></a>
|
||||
</dd>
|
||||
{{# } }}
|
||||
<!-- {{# if(items.isFolder === true){ }}
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;" class="fontcolor mykanban second category xiangmukongjian" data-id="{{items._id}}"> <i class="layui-icon layui-icon-file-b"></i> {{items.name}}
|
||||
<img src="./static/img/gengduo.png" class="nav-file-bar" data-id="{{items._id}}"/></a>
|
||||
{{# layui.each(items.children, function(value, datas){ }}
|
||||
<dl class="layui-nav-child modeify-layui-nav-child">
|
||||
<dd class="layui-left-dd" data-id="{{datas._id}}"><a href="javascript:;" class="fontcolor second3 category"> <span>{{datas.name}}</span>
|
||||
<img src="./static/img/gengduo.png" alt="" class="nav-action-bar" data-id="{{datas._id}}"></a></dd>
|
||||
</dl>
|
||||
{{# }); }}
|
||||
</li> -->
|
||||
<!-- {{# } else { }} -->
|
||||
<!-- {{# if(indexs == 0){ }}
|
||||
<dd class="layui-left-dd layui-this" data-id="{{items._id}}"><a href="javascript:;" class="fontcolor second category"> <span>{{items.name}} </span>
|
||||
<img src="./static/img/gengduo.png" alt="" class="nav-action-bar" data-id="{{items._id}}"></a>
|
||||
</dd>
|
||||
{{# } else { }} -->
|
||||
<!-- <dd class="layui-left-dd" data-id="{{items._id}}"><a href="javascript:;" class="fontcolor second category"> <span>{{items.name}} </span>
|
||||
<img src="./static/img/gengduo.png" alt="" class="nav-action-bar" data-id="{{items._id}}"></a>
|
||||
</dd> -->
|
||||
<!-- {{# } }} -->
|
||||
<!-- {{# } }} -->
|
||||
{{# }); }}
|
||||
|
||||
</dl>
|
||||
</li>
|
||||
{{# } }}
|
||||
|
3709
web/src/Sortable.js
Normal file
3709
web/src/Sortable.js
Normal file
File diff suppressed because it is too large
Load Diff
53
web/src/x.min.js
vendored
53
web/src/x.min.js
vendored
@ -4494,6 +4494,7 @@ var X = window.X || {
|
||||
for(let q in d.spaces){
|
||||
for(let j in d.spaces[q]['children']){
|
||||
d.spaces[q]['children'][j]['onclick'] = 0;
|
||||
d.spaces[q]['children'][j]['sort'] = j
|
||||
if(j == 0){
|
||||
d.spaces[q]['children'][j]['onclick'] = 1;
|
||||
}
|
||||
@ -4505,6 +4506,7 @@ var X = window.X || {
|
||||
for(let q in d.spaces){
|
||||
for(let j in d.spaces[q]['children']){
|
||||
d.spaces[q]['children'][j]['onclick'] = 0;
|
||||
d.spaces[q]['children'][j]['sort'] = j
|
||||
if(d.spaces[q]['children'][j]['_id'] == X.DATA['dashboard_id']){
|
||||
d.spaces[q]['children'][j]['onclick'] = 1;
|
||||
$(".tab-tit-box .tab-tit").html(d.spaces[q]['children'][j]['name']);
|
||||
@ -4517,31 +4519,40 @@ var X = window.X || {
|
||||
$("#model-box").html("");
|
||||
// 获取报表数据
|
||||
X.pageLogic['dashboard'].gettabledata();
|
||||
var sidebar = document.getElementById('sidebar-box');
|
||||
new Sortable(sidebar, {
|
||||
handle: '.tuodong', // handle class
|
||||
animation: 150,
|
||||
onUpdate:function(evt){
|
||||
var newIndex = evt.newIndex;
|
||||
var oldIndex = evt.oldIndex;
|
||||
// console.log(d.spaces);
|
||||
for(let j in d.spaces[i]['children']){
|
||||
if(j >= newIndex){
|
||||
d.spaces[i]['children'][j]['sort'] = Number(d.spaces[i]['children'][j]['sort']) + Number(1);
|
||||
}
|
||||
}
|
||||
d.spaces[i]['children'][oldIndex]['sort'] = newIndex;
|
||||
var sortarr = [];
|
||||
for(let q in d.spaces[i]['children']){
|
||||
var arr = {
|
||||
dashboard_id: d.spaces[i]['children'][q]['_id'],
|
||||
sort: d.spaces[i]['children'][q]['sort']
|
||||
}
|
||||
sortarr.push(arr);
|
||||
}
|
||||
X.api('dashboard/sort','post',{sort:sortarr},function(d){
|
||||
if(d == 1){
|
||||
X.pageLogic.dashboard.freshMenu(X.DATA['projectid']);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
break;//终止循环
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// var updateOutput = function(e){
|
||||
|
||||
// var list = e.length ? e : $(e.target),
|
||||
|
||||
// output = list.data('output');
|
||||
|
||||
// if (window.JSON) {
|
||||
|
||||
// output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2));
|
||||
// console.log(list.nestable('serialize'));
|
||||
|
||||
// } else {
|
||||
|
||||
// output.val('JSON browser support required for this demo.');
|
||||
// console.log(222);
|
||||
// }
|
||||
|
||||
// };
|
||||
|
||||
// $('#sidebar-box').nestable({group: 1}).on('change', updateOutput);
|
||||
// updateOutput($('#sidebar-box').data('output', $('#nestable-output')));
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -552,6 +552,7 @@
|
||||
for(let q in d.spaces){
|
||||
for(let j in d.spaces[q]['children']){
|
||||
d.spaces[q]['children'][j]['onclick'] = 0;
|
||||
d.spaces[q]['children'][j]['sort'] = j
|
||||
if(j == 0){
|
||||
d.spaces[q]['children'][j]['onclick'] = 1;
|
||||
}
|
||||
@ -563,6 +564,7 @@
|
||||
for(let q in d.spaces){
|
||||
for(let j in d.spaces[q]['children']){
|
||||
d.spaces[q]['children'][j]['onclick'] = 0;
|
||||
d.spaces[q]['children'][j]['sort'] = j
|
||||
if(d.spaces[q]['children'][j]['_id'] == X.DATA['dashboard_id']){
|
||||
d.spaces[q]['children'][j]['onclick'] = 1;
|
||||
$(".tab-tit-box .tab-tit").html(d.spaces[q]['children'][j]['name']);
|
||||
@ -575,31 +577,40 @@
|
||||
$("#model-box").html("");
|
||||
// 获取报表数据
|
||||
X.pageLogic['dashboard'].gettabledata();
|
||||
var sidebar = document.getElementById('sidebar-box');
|
||||
new Sortable(sidebar, {
|
||||
handle: '.tuodong', // handle class
|
||||
animation: 150,
|
||||
onUpdate:function(evt){
|
||||
var newIndex = evt.newIndex;
|
||||
var oldIndex = evt.oldIndex;
|
||||
// console.log(d.spaces);
|
||||
for(let j in d.spaces[i]['children']){
|
||||
if(j >= newIndex){
|
||||
d.spaces[i]['children'][j]['sort'] = Number(d.spaces[i]['children'][j]['sort']) + Number(1);
|
||||
}
|
||||
}
|
||||
d.spaces[i]['children'][oldIndex]['sort'] = newIndex;
|
||||
var sortarr = [];
|
||||
for(let q in d.spaces[i]['children']){
|
||||
var arr = {
|
||||
dashboard_id: d.spaces[i]['children'][q]['_id'],
|
||||
sort: d.spaces[i]['children'][q]['sort']
|
||||
}
|
||||
sortarr.push(arr);
|
||||
}
|
||||
X.api('dashboard/sort','post',{sort:sortarr},function(d){
|
||||
if(d == 1){
|
||||
X.pageLogic.dashboard.freshMenu(X.DATA['projectid']);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
break;//终止循环
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// var updateOutput = function(e){
|
||||
|
||||
// var list = e.length ? e : $(e.target),
|
||||
|
||||
// output = list.data('output');
|
||||
|
||||
// if (window.JSON) {
|
||||
|
||||
// output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2));
|
||||
// console.log(list.nestable('serialize'));
|
||||
|
||||
// } else {
|
||||
|
||||
// output.val('JSON browser support required for this demo.');
|
||||
// console.log(222);
|
||||
// }
|
||||
|
||||
// };
|
||||
|
||||
// $('#sidebar-box').nestable({group: 1}).on('change', updateOutput);
|
||||
// updateOutput($('#sidebar-box').data('output', $('#nestable-output')));
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user