Skip to content

Commit

Permalink
Bug 1370144 - Fix the Push author tooltip (#2541) r=emorley
Browse files Browse the repository at this point in the history
  • Loading branch information
KWierso committed Jun 30, 2017
1 parent d7fda53 commit 89e648b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions ui/js/directives/treeherder/resultsets.js
Expand Up @@ -39,17 +39,12 @@ treeherder.directive('thAuthor', function () {
return {
restrict: "E",
link: function (scope, element, attrs) {
var userTokens = attrs.author.split(/[<>]+/);
var email = "";
if (userTokens.length > 1) {
email = userTokens[1];
}
scope.authorName = userTokens[0].trim();
scope.authorEmail = email;
var authorMatch = attrs.author.match(/\<(.*?)\>+/);
scope.authorEmail = authorMatch ? authorMatch[1] : attrs.author;
},
template: '<span title="View pushes by {{authorEmail}}">' +
template: '<span title="View pushes by this user">' +
'<a href="{{authorResultsetFilterUrl}}"' +
'data-ignore-job-clear-on-click>{{authorName}}</a></span>'
'data-ignore-job-clear-on-click>{{authorEmail}}</a></span>'
};
});

0 comments on commit 89e648b

Please sign in to comment.