mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Ensure that we only select the first item when updating tree
nodes, otherwise we change the title for all nested node's text as well.
This commit is contained in:
parent
447ef16294
commit
f3912f32d8
@ -134,7 +134,9 @@
|
||||
*/
|
||||
updateTreeLabel: function(title) {
|
||||
var pageID = $('.cms-edit-form input[name=ID]').val();
|
||||
var treeItem = $('.item', $('.cms-tree').find("[data-id='" + pageID + "']"));
|
||||
|
||||
// only update immediate text element, we don't want to update all the nested ones
|
||||
var treeItem = $('.item:first', $('.cms-tree').find("[data-id='" + pageID + "']"));
|
||||
if (title && title != "") {
|
||||
treeItem.text(title);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user