directive tr-selectable refactored