mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Fixed CMS sort sub-pages bug
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.1.0@42287 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
73b5103a78
commit
1726e9a65f
@ -599,8 +599,11 @@ JS;
|
||||
$_REQUEST['ajax'] = 1;
|
||||
|
||||
if(is_array($_REQUEST['ID'])) {
|
||||
$movedNode = DataObject::get_by_id($className, $_REQUEST['MovedNodeID']);
|
||||
|
||||
if($_REQUEST['MovedNodeID']==0){ //Sorting root
|
||||
$movedNode = DataObject::get($className, "`ParentID`=0");
|
||||
}else{
|
||||
$movedNode = DataObject::get_by_id($className, $_REQUEST['MovedNodeID']);
|
||||
}
|
||||
foreach($_REQUEST['ID'] as $id) {
|
||||
if($id == $movedNode->ID) {
|
||||
$movedNode->Sort = ++$counter;
|
||||
|
@ -265,6 +265,6 @@ TreeContextMenu = {
|
||||
treeNode.appendTreeNode(child);
|
||||
}
|
||||
|
||||
treeNode.onOrderChanged(sortedChildren);
|
||||
treeNode.onOrderChanged(sortedChildren,treeNode);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user