mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX #2706: Fixed JS error in multi-nested pages deletion
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@65896 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
98f749cdb8
commit
f001eee5fe
@ -793,7 +793,7 @@ HTML;
|
||||
FormResponse::add("\$('sitetree').setNodeTitle($page->ID, '$JS_title');");
|
||||
} else {
|
||||
FormResponse::add("var node = $('sitetree').getTreeNodeByIdx('$page->ID');");
|
||||
FormResponse::add("if(node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);");
|
||||
FormResponse::add("if(node && node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);");
|
||||
FormResponse::add("$('Form_EditForm').reloadIfSetTo($page->ID);");
|
||||
}
|
||||
|
||||
@ -1069,7 +1069,7 @@ HTML;
|
||||
FormResponse::add("$('Form_EditForm').reloadIfSetTo($record->OldID);");
|
||||
} else {
|
||||
FormResponse::add("var node = $('sitetree').getTreeNodeByIdx('$id');");
|
||||
FormResponse::add("if(node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);");
|
||||
FormResponse::add("if(node && node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);");
|
||||
FormResponse::add("$('Form_EditForm').reloadIfSetTo($record->OldID);");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user