mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
HistoryView: Factor out email formatting
The patches to show the committer's name depend on this.
This commit is contained in:
@@ -223,8 +223,11 @@ var enableFeatures = function()
|
||||
|
||||
var loadExtendedCommit = function(commit)
|
||||
{
|
||||
if (commit.author_email)
|
||||
$("authorID").innerHTML = commit.author_name + " <<a href='mailto:" + commit.author_email + "'>" + commit.author_email + "</a>>";
|
||||
var formatEmail = function(name, email) {
|
||||
return email ? name + " <<a href='mailto:" + email + "'>" + email + "</a>>" : name;
|
||||
}
|
||||
|
||||
$("authorID").innerHTML = formatEmail(commit.author_name, commit.author_email);
|
||||
|
||||
$("date").innerHTML = commit.author_date;
|
||||
$("message").innerHTML = commit.message.replace(/\n/g,"<br>");
|
||||
|
||||
Reference in New Issue
Block a user