Skip to content

Commit

Permalink
コンテンツの並び替え調整 (baserproject#3552)
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 authored Jun 26, 2024
1 parent 441f052 commit cff505f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions plugins/bc-admin-third/src/js/admin/_lib/jquery.bcTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@
"force_text": true,
"check_callback": function (operation, node, node_parent, node_position, more) {
if (operation == 'move_node') {
if (!$.bcTree.config.isUseMoveContents) {
return false;
}
if (node_parent.type == 'folder' && !node_parent.data.jstree.alias && !node.data.jstree.contentSiteRoot) {
$.bcTree.dropTarget = node_parent;
$.bcTree.dragTarget = node;
Expand All @@ -257,7 +254,17 @@
"types"
],
"dnd": {
"large_drop_target": true
"large_drop_target": true,
"is_draggable" : function (nodes) {
if (!$.bcTree.config.isUseMoveContents) {
return false;
}
// 最上位のコンテンツは移動不可
if (nodes[0].parents.length <= 1) {
return false;
}
return true;
},
},
"types": {
"default": {},
Expand Down
Loading

0 comments on commit cff505f

Please sign in to comment.