move click on fav-icon function to tree.js and change events to delegate

to make this event possible on newsteps and dropped pattern steps