MINOR Enforce SiteTree::$allowed_children in tree drag'n'drop for VirtualPage originals

This commit is contained in:
Ingo Schommer 2012-01-14 12:55:17 +01:00
parent 9451993d74
commit a6cc7d8392
1 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,9 @@
disallowedChildren = [],
hintKey = newParentClass ? newParentClass : 'Root',
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 : [];
var isAllowed = (