Task preview fix

Styling needs fixing.
this would work better in directive controller - there is no need to call this more than once