mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Only select node after form reload if creating the node
This commit is contained in:
parent
6cfade0b3d
commit
d4dbb0680b
@ -232,14 +232,17 @@
|
|||||||
self.jstree('select_node', newNode);
|
self.jstree('select_node', newNode);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// set current tree element
|
||||||
|
this.jstree('select_node', node);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Fix node parent setting
|
// TODO Fix node parent setting
|
||||||
// // set correct parent (only if it has changed)
|
// // set correct parent (only if it has changed)
|
||||||
// if(parentID) this.setNodeParentID(id, jQuery(e.target.ParentID).val());
|
// if(parentID) this.setNodeParentID(id, jQuery(e.target.ParentID).val());
|
||||||
|
|
||||||
// set current tree element
|
// TODO Fix doubleup when replacing page form with root form, reloads the old form over the root
|
||||||
this.jstree('select_node', node);
|
// set current tree element regardless of wether the item was new
|
||||||
|
// this.jstree('select_node', node);
|
||||||
} else {
|
} else {
|
||||||
if(typeof eventData.origData != 'undefined') {
|
if(typeof eventData.origData != 'undefined') {
|
||||||
var node = this.find('li[data-id='+eventData.origData.ID+']');
|
var node = this.find('li[data-id='+eventData.origData.ID+']');
|
||||||
|
Loading…
Reference in New Issue
Block a user