Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Enforce SiteTree::$allowed_children in tree drag'n'drop for Vir…

…tualPage originals
  • Loading branch information...
commit a6cc7d839214beb7cd2dd42636b42bfbd582bf17 1 parent 9451993
@chillu chillu authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  admin/javascript/LeftAndMain.Tree.js
View
3  admin/javascript/LeftAndMain.Tree.js
@@ -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 = (
Please sign in to comment.
Something went wrong with that request. Please try again.