mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Correct DOM structure on updating tree nodes from edit forms, adding badge classes to force strike-through styling on deleted nodes (see #7410)
This commit is contained in:
parent
2637969bcd
commit
896d198890
@ -223,7 +223,15 @@
|
||||
|
||||
// set title (either from TreeTitle or from Title fields)
|
||||
// Treetitle has special HTML formatting to denote the status changes.
|
||||
if(title) this.jstree('rename_node', node, title);
|
||||
if(title) node.find('.text').html(title);
|
||||
|
||||
// Collect flag classes and also apply to parent
|
||||
var statusFlags = [];
|
||||
node.children('a').find('.badge').each(function() {
|
||||
statusFlags = statusFlags.concat($(this).attr('class').replace('badge', '').split(' '));
|
||||
});
|
||||
// TODO Doesn't remove classes, gets too complex: Best handled through complete serverside replacement
|
||||
node.addClass(statusFlags.join(' '));
|
||||
|
||||
// check if node exists, might have been created instead
|
||||
if(!node.length) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user