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/trunk@42935 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e5060b6d30
commit
f9b314d662
@ -657,8 +657,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;
|
||||
|
@ -381,6 +381,6 @@ TreeContextMenu = {
|
||||
treeNode.appendTreeNode(child);
|
||||
}
|
||||
|
||||
treeNode.onOrderChanged(sortedChildren);
|
||||
treeNode.onOrderChanged(sortedChildren,treeNode);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user