diff options
Diffstat (limited to 'extensions/MozReview')
-rw-r--r-- | extensions/MozReview/template/en/default/moz_review/table.html.tmpl | 5 | ||||
-rw-r--r-- | extensions/MozReview/web/js/mozreview.js | 41 | ||||
-rw-r--r-- | extensions/MozReview/web/style/mozreview.css | 7 |
3 files changed, 24 insertions, 29 deletions
diff --git a/extensions/MozReview/template/en/default/moz_review/table.html.tmpl b/extensions/MozReview/template/en/default/moz_review/table.html.tmpl index 1a40cf7db..7f5c3a89d 100644 --- a/extensions/MozReview/template/en/default/moz_review/table.html.tmpl +++ b/extensions/MozReview/template/en/default/moz_review/table.html.tmpl @@ -9,8 +9,9 @@ <table class="mozreview-requests" data-mozreview-url="[% Bugzilla.params.mozreview_base_url FILTER html %]"> <thead> <tr> - <th>Commit</th> - <th>Status</th> + <th>Submitter</th> + <th>Diff</th> + <th>Reviews</th> <th>Open Issues</th> <th>Last Updated</th> </tr> diff --git a/extensions/MozReview/web/js/mozreview.js b/extensions/MozReview/web/js/mozreview.js index 272f7a61b..70d99aaf6 100644 --- a/extensions/MozReview/web/js/mozreview.js +++ b/extensions/MozReview/web/js/mozreview.js @@ -12,6 +12,7 @@ MozReview.getReviewRequest = function() { var hostUrl = $('.mozreview-requests').data('mozreviewUrl'); var tr = $('<tr/>'); var td = $('<td/>'); + var link = $('<a/>'); var rrSummaryApiUrl = hostUrl + 'api/extensions/mozreview.extension.MozReviewExtension/summary/?bug=' + @@ -26,34 +27,32 @@ MozReview.getReviewRequest = function() { return rrUrl(rrId) + 'diff/#index_header'; } - function rrRow(rr, isParent) { - var tdSummary = td.clone(); + function rrCommitRow(rr, firstCommit) { var trCommit = tr.clone(); - var reviewLink = $('<a/>'); - var diffLink = reviewLink.clone(); - - if (!isParent) { - tdSummary.addClass('mozreview-child-request-summary'); - diffLink.attr('href', rrDiffUrl(rr.id)); - diffLink.text(rr.commit.substr(0, 12)); - diffLink.addClass('mozreview-diff-link'); - tdSummary.append(diffLink); - tdSummary.append(' '); + var tdSubmitter = td.clone(); + var tdRev = td.clone(); + var tdSummary = td.clone(); + var diffLink = link.clone(); + var reviewLink = link.clone(); + + if (firstCommit) { + tdSubmitter.text(rr.submitter); } + diffLink.attr('href', rrDiffUrl(rr.id)); + diffLink.text(rr.commit.substr(0, 12)); + diffLink.addClass('mozreview-diff-link'); + tdRev.append(diffLink); + + tdSummary.addClass('mozreview-summary'); reviewLink.attr('href', rrUrl(rr.id)); reviewLink.text(rr.summary); tdSummary.append(reviewLink); - if (isParent) { - tdSummary.append($('<span/>').text(' (' + rr.submitter + ')')); - } - - tdSummary.addClass('mozreview-summary'); - trCommit.append( + tdSubmitter, + tdRev, tdSummary, - td.clone().text(rr.status), td.clone().text(rr.issue_open_count) .addClass('mozreview-open-issues'), td.clone().text(timeAgo(new Date(rr.last_updated))) @@ -94,10 +93,8 @@ MozReview.getReviewRequest = function() { } else { for (i = 0; i < data.review_request_summaries.length; i++) { family = data.review_request_summaries[i]; - parent = family.parent; - tbody.append(rrRow(parent, true)); for (j = 0; j < family.children.length; j++) { - tbody.append(rrRow(family.children[j], false)); + tbody.append(rrCommitRow(family.children[j], j==0)); } } } diff --git a/extensions/MozReview/web/style/mozreview.css b/extensions/MozReview/web/style/mozreview.css index 70d088539..4a288d927 100644 --- a/extensions/MozReview/web/style/mozreview.css +++ b/extensions/MozReview/web/style/mozreview.css @@ -19,7 +19,8 @@ } .mozreview-table td { - padding: 4px; + vertical-align: middle !important; + padding: 4px !important; } .mozreview-table thead, .mozreview-table tfoot { @@ -49,10 +50,6 @@ text-align: center; } -.mozreview-child-request-summary { - text-indent: 1em; -} - .mozreview-diff-link { font-family: monospace; } |