mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +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
d55eb13ecc
@ -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