add onClick and onContextmenu events to tree options