diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-13 16:26:48 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-13 16:26:48 +0300 |
commit | 31e9f82ebc24ff04cb4eeaf933f6f3b158a38a62 (patch) | |
tree | 6e06dbb2b782cb1304f82cff82e67b80ddb3c1b7 /app/assets/javascripts/stat_graph_contributors.js.coffee | |
parent | 7825830ca51dc7bf84ca6216c3b66e3ce1c63c44 (diff) | |
download | gitlab-ce-31e9f82ebc24ff04cb4eeaf933f6f3b158a38a62.tar.gz |
Improve repository graph
Diffstat (limited to 'app/assets/javascripts/stat_graph_contributors.js.coffee')
-rw-r--r-- | app/assets/javascripts/stat_graph_contributors.js.coffee | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/assets/javascripts/stat_graph_contributors.js.coffee b/app/assets/javascripts/stat_graph_contributors.js.coffee index 5b4b3dae411..168b7337041 100644 --- a/app/assets/javascripts/stat_graph_contributors.js.coffee +++ b/app/assets/javascripts/stat_graph_contributors.js.coffee @@ -16,7 +16,7 @@ class window.ContributorsStatGraph _.each(limited_author_data, (d) => author_header = @create_author_header(d) $(".contributors-list").append(author_header) - @authors[d.author] = author_graph = new ContributorsAuthorGraph(d.dates) + @authors[d.author_name] = author_graph = new ContributorsAuthorGraph(d.dates) author_graph.draw() ) format_author_commit_info: (author) -> @@ -46,13 +46,15 @@ class window.ContributorsStatGraph class: 'person' style: 'display: block;' }) - author_name = $('<h4>' + author.author + '</h4>') + author_name = $('<h4>' + author.author_name + '</h4>') + author_email = $('<p class="graph-author-email">' + author.author_email + '</p>') author_commit_info_span = $('<span/>', { class: 'commits' }) author_commit_info = @format_author_commit_info(author) author_commit_info_span.html(author_commit_info) list_item.append(author_name) + list_item.append(author_email) list_item.append(author_commit_info_span) list_item redraw_master: -> @@ -65,9 +67,9 @@ class window.ContributorsStatGraph author_commits = ContributorsStatGraphUtil.get_author_data(@parsed_log, @field, x_domain) _.each(author_commits, (d) => @redraw_author_commit_info(d) - $(@authors[d.author].list_item).appendTo("ol") - @authors[d.author].set_data(d.dates) - @authors[d.author].redraw() + $(@authors[d.author_name].list_item).appendTo("ol") + @authors[d.author_name].set_data(d.dates) + @authors[d.author_name].redraw() ) set_current_field: (field) -> @field = field @@ -77,6 +79,6 @@ class window.ContributorsStatGraph print = print_date_format(x_domain[0]) + " - " + print_date_format(x_domain[1]) $("#date_header").text(print) redraw_author_commit_info: (author) -> - author_list_item = $(@authors[author.author].list_item) + author_list_item = $(@authors[author.author_name].list_item) author_commit_info = @format_author_commit_info(author) author_list_item.find("span").html(author_commit_info) |