Updates tree js so it opens correct edit page