Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a085e3fb
Commit
a085e3fb
authored
Nov 22, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed resolved discussion timeago not rendering
Closes #24787
parent
0f590750
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
app/assets/javascripts/diff_notes/models/discussion.js.es6
app/assets/javascripts/diff_notes/models/discussion.js.es6
+6
-3
changelogs/unreleased/resolve-discussions-timeago.yml
changelogs/unreleased/resolve-discussions-timeago.yml
+4
-0
No files found.
app/assets/javascripts/diff_notes/models/discussion.js.es6
View file @
a085e3fb
...
@@ -57,14 +57,17 @@ class DiscussionModel {
...
@@ -57,14 +57,17 @@ class DiscussionModel {
}
}
updateHeadline (data) {
updateHeadline (data) {
const $discussionHeadline = $(`.discussion[data-discussion-id="${this.id}"] .js-discussion-headline`);
const discussionSelector = `.discussion[data-discussion-id="${this.id}"]`;
const $discussionHeadline = $(`${discussionSelector} .js-discussion-headline`);
if (data.discussion_headline_html) {
if (data.discussion_headline_html) {
if ($discussionHeadline.length) {
if ($discussionHeadline.length) {
$discussionHeadline.replaceWith(data.discussion_headline_html);
$discussionHeadline.replaceWith(data.discussion_headline_html);
} else {
} else {
$(`
.discussion[data-discussion-id="${this.id}"]
.discussion-header`).append(data.discussion_headline_html);
$(`
${discussionSelector}
.discussion-header`).append(data.discussion_headline_html);
}
}
gl.utils.localTimeAgo($('.js-timeago', `${discussionSelector}`));
} else {
} else {
$discussionHeadline.remove();
$discussionHeadline.remove();
}
}
...
...
changelogs/unreleased/resolve-discussions-timeago.yml
0 → 100644
View file @
a085e3fb
---
title
:
Fixed timeago not rendering when resolving a discussion
merge_request
:
author
:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment