diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-02-29 21:20:40 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-02-29 21:20:40 +0000 |
commit | e5276ee6ab24e52740a72582eda188a698584bb3 (patch) | |
tree | 405ae296732ffe94b80d92360b930b18368ee5ec | |
parent | 333ad73e765d87fa1ccbd4a361f7f172c790f897 (diff) | |
parent | 4f529a88065b39a488814a87b08086be54a2037c (diff) | |
download | gitlab-ce-e5276ee6ab24e52740a72582eda188a698584bb3.tar.gz |
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
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js.coffee | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/notes.scss | 13 | ||||
-rw-r--r-- | app/views/projects/notes/_note.html.haml | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee index 40cfa59a229..23a218b4c7d 100644 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ b/app/assets/javascripts/merge_request_tabs.js.coffee @@ -146,6 +146,7 @@ class @MergeRequestTabs url: "#{source}.json" + @_location.search success: (data) => document.querySelector("div#diffs").innerHTML = data.html + $('.js-timeago').timeago() $('div#diffs .js-syntax-highlight').syntaxHighlight() @expandViewContainer() if @diffViewType() is 'parallel' @diffsLoaded = true diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 19ead07c06a..d5f9852ebed 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -14,6 +14,18 @@ ul.notes { margin: 0px; padding: 0px; + .timeline-icon { + float: left; + } + + .timeline-content { + margin-left: 55px; + } + + .note_created_ago, .note-updated-at { + white-space: nowrap; + } + .system-note { font-size: 14px; padding-top: 10px; @@ -151,6 +163,7 @@ ul.notes { border-left: none; &.notes_line { + vertical-align: middle; text-align: center; padding: 10px 0; background: #FFF; diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index e858c412836..52972576aff 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -28,7 +28,7 @@ %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') - if note.updated_at != note.created_at - %span + %span.note-updated-at · = icon('edit', title: 'edited') = time_ago_with_tooltip(note.updated_at, placement: 'bottom', html_class: 'note_edited_ago') |