Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-04-12 00:45:03 +0300
committerAlfredo Sumaran <alfredo@gitlab.com>2016-04-12 00:45:03 +0300
commit38a4f5cec6ab85525ab9db1d7d2669a77171f768 (patch)
treec30d3d33f34e5db520b090e294ca80d68a1067e7 /app/assets/javascripts/notes.js.coffee
parent3440c0e61f570e9f42a81fb125a021b138b5bebc (diff)
Rename method and initialize .timeago inside
Diffstat (limited to 'app/assets/javascripts/notes.js.coffee')
-rw-r--r--app/assets/javascripts/notes.js.coffee9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index 02e52040e3c..a67890200dd 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -170,8 +170,7 @@ class @Notes
.syntaxHighlight()
# Update datetime format on the recent note
- $timeago = $notesList.find("#note_#{note.id} .js-timeago")
- gl.utils.updateFormatDate($timeago)
+ gl.utils.localTimeAgo($notesList.find("#note_#{note.id} .js-timeago"), false)
@initTaskList()
@updateNotesCount(1)
@@ -224,7 +223,7 @@ class @Notes
# append new note to all matching discussions
discussionContainer.append note_html
- gl.utils.updateFormatDate($('.js-timeago', note_html))
+ gl.utils.localTimeAgo($('.js-timeago', note_html), false)
@updateNotesCount(1)
@@ -355,9 +354,7 @@ class @Notes
# Convert returned HTML to a jQuery object so we can modify it further
$html = $(note.html)
- $timeago = $('.js-timeago', $html)
- gl.utils.updateFormatDate($timeago)
- $timeago.timeago()
+ gl.utils.localTimeAgo($('.js-timeago', $html))
$html.syntaxHighlight()
$html.find('.js-task-list-container').taskList('enable')