Commit e5276ee6 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'issue_13212' into 'master'

Fixes padding loss after editing a diff comment

Also applies .timeago() to comment datetimes when diff page is entered directly.

Also fixes the vertical position of the comment count icon.

See merge request !3012
parents 333ad73e 4f529a88
...@@ -146,6 +146,7 @@ class @MergeRequestTabs ...@@ -146,6 +146,7 @@ class @MergeRequestTabs
url: "#{source}.json" + @_location.search url: "#{source}.json" + @_location.search
success: (data) => success: (data) =>
document.querySelector("div#diffs").innerHTML = data.html document.querySelector("div#diffs").innerHTML = data.html
$('.js-timeago').timeago()
$('div#diffs .js-syntax-highlight').syntaxHighlight() $('div#diffs .js-syntax-highlight').syntaxHighlight()
@expandViewContainer() if @diffViewType() is 'parallel' @expandViewContainer() if @diffViewType() is 'parallel'
@diffsLoaded = true @diffsLoaded = true
......
...@@ -14,6 +14,18 @@ ul.notes { ...@@ -14,6 +14,18 @@ ul.notes {
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
.timeline-icon {
float: left;
}
.timeline-content {
margin-left: 55px;
}
.note_created_ago, .note-updated-at {
white-space: nowrap;
}
.system-note { .system-note {
font-size: 14px; font-size: 14px;
padding-top: 10px; padding-top: 10px;
...@@ -151,6 +163,7 @@ ul.notes { ...@@ -151,6 +163,7 @@ ul.notes {
border-left: none; border-left: none;
&.notes_line { &.notes_line {
vertical-align: middle;
text-align: center; text-align: center;
padding: 10px 0; padding: 10px 0;
background: #FFF; background: #FFF;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
%a{name: dom_id(note), href: "##{dom_id(note)}", title: 'Link here'} %a{name: dom_id(note), href: "##{dom_id(note)}", title: 'Link here'}
= time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note_created_ago') = time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note_created_ago')
- if note.updated_at != note.created_at - if note.updated_at != note.created_at
%span %span.note-updated-at
· ·
= icon('edit', title: 'edited') = icon('edit', title: 'edited')
= time_ago_with_tooltip(note.updated_at, placement: 'bottom', html_class: 'note_edited_ago') = time_ago_with_tooltip(note.updated_at, placement: 'bottom', html_class: 'note_edited_ago')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment