From d4dbb0680b191a2fd9373567d8a93f6429cd2468 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 22 Mar 2011 17:22:03 +1300 Subject: [PATCH] BUGFIX Only select node after form reload if creating the node --- javascript/LeftAndMain.Tree.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/javascript/LeftAndMain.Tree.js b/javascript/LeftAndMain.Tree.js index 3af88334..04727ede 100755 --- a/javascript/LeftAndMain.Tree.js +++ b/javascript/LeftAndMain.Tree.js @@ -232,14 +232,17 @@ self.jstree('select_node', newNode); } ); + // set current tree element + this.jstree('select_node', node); } // TODO Fix node parent setting // // set correct parent (only if it has changed) // if(parentID) this.setNodeParentID(id, jQuery(e.target.ParentID).val()); - // set current tree element - this.jstree('select_node', node); + // TODO Fix doubleup when replacing page form with root form, reloads the old form over the root + // set current tree element regardless of wether the item was new + // this.jstree('select_node', node); } else { if(typeof eventData.origData != 'undefined') { var node = this.find('li[data-id='+eventData.origData.ID+']');