feat(invitations): add prop 'info-uname' into directives 'user-info'

This commit is contained in:
OldHawk
2017-09-14 11:41:03 +08:00
parent 642516cfaf
commit fde647cd2b
3 changed files with 4 additions and 2 deletions

View File

@@ -75,7 +75,7 @@
popover-trigger="'mouseenter'"
popover-placement="top-right"
ng-mouseenter="vm.selectedUser=r.to_user">
<abbr title="user detail">{{r.to_user.username}}<span message-to="r.to_user"
<abbr title="user detail"><span user-info="r.to_user" info-uname></span><span message-to="r.to_user"
to-class="message-to-icon"></span></abbr>
</td>
<td class="text-center" ng-if="!r.to_user">

View File

@@ -105,7 +105,7 @@
popover-trigger="'mouseenter'"
popover-placement="top-right"
ng-mouseenter="vm.selectedUser=r.to_user">
<abbr title="user detail">{{r.to_user.username}}<span message-to="r.to_user"
<abbr title="user detail"><span user-info="r.to_user" info-uname></span><span message-to="r.to_user"
to-class="message-to-icon"></span></abbr>
</td>
<td class="text-center" ng-if="!r.to_user">

View File

@@ -24,6 +24,8 @@
if (attrs.hasOwnProperty('infoName')) {
e = angular.element('<a href="#" ui-sref="userinfo({userId: \'' + user._id + '\'})" ng-click="$event.stopPropagation();">' + user.displayName + '</a>');
} else if (attrs.hasOwnProperty('infoUname')) {
e = angular.element('<a href="#" ui-sref="userinfo({userId: \'' + user._id + '\'})" ng-click="$event.stopPropagation();">' + user.username + '</a>');
} else if (attrs.hasOwnProperty('infoAvatar')) {
e = angular.element('<a href="#" ui-sref="userinfo({userId: \'' + user._id + '\'})" ng-click="$event.stopPropagation();"><img src="/' + user.profileImageURL + '"></a>');
}