superdesk/superdesk-client-core

View on GitHub
scripts/apps/users/directives/UserInfoDirective.ts

Summary

Maintainability
A
0 mins
Test Coverage
UserInfoDirective.$inject = ['userPopup'];
export function UserInfoDirective(userPopup) {
    return {
        link: function(scope, element, attrs) {
            element.addClass('user-link');
            element.hover(() => {
                userPopup.set(attrs.user, element, scope);
            }, () => {
                userPopup.close();
            });
        },
    };
}