diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-11 16:45:03 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-11 16:45:03 -0500 |
commit | 38a4f5cec6ab85525ab9db1d7d2669a77171f768 (patch) | |
tree | c30d3d33f34e5db520b090e294ca80d68a1067e7 /app/assets/javascripts/notes.js.coffee | |
parent | 3440c0e61f570e9f42a81fb125a021b138b5bebc (diff) | |
download | gitlab-ce-38a4f5cec6ab85525ab9db1d7d2669a77171f768.tar.gz |
Rename method and initialize .timeago inside
Diffstat (limited to 'app/assets/javascripts/notes.js.coffee')
-rw-r--r-- | app/assets/javascripts/notes.js.coffee | 9 |
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') |