mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Enforce SiteTree::$allowed_children in tree drag'n'drop for VirtualPage originals
This commit is contained in:
parent
9451993d74
commit
a6cc7d8392
@ -67,6 +67,9 @@
|
|||||||
hintKey = newParentClass ? newParentClass : 'Root',
|
hintKey = newParentClass ? newParentClass : 'Root',
|
||||||
hint = (typeof hints[hintKey] != 'undefined') ? hints[hintKey] : null;
|
hint = (typeof hints[hintKey] != 'undefined') ? hints[hintKey] : null;
|
||||||
|
|
||||||
|
// Special case for VirtualPage: Check that original page type is an allowed child
|
||||||
|
if(hint && movedNode.attr('class').match(/VirtualPage-([^\s]*)/)) movedNodeClass = RegExp.$1;
|
||||||
|
|
||||||
if(hint) disallowedChildren = (typeof hint.disallowedChildren != 'undefined') ? hint.disallowedChildren : [];
|
if(hint) disallowedChildren = (typeof hint.disallowedChildren != 'undefined') ? hint.disallowedChildren : [];
|
||||||
var isAllowed = (
|
var isAllowed = (
|
||||||
// Don't allow moving the root node
|
// Don't allow moving the root node
|
||||||
|
Loading…
Reference in New Issue
Block a user