diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-12 00:45:03 +0300 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-04-12 00:45:03 +0300 |
commit | 38a4f5cec6ab85525ab9db1d7d2669a77171f768 (patch) | |
tree | c30d3d33f34e5db520b090e294ca80d68a1067e7 /app/assets/javascripts/merge_request_tabs.js.coffee | |
parent | 3440c0e61f570e9f42a81fb125a021b138b5bebc (diff) |
Rename method and initialize .timeago inside
Diffstat (limited to 'app/assets/javascripts/merge_request_tabs.js.coffee')
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js.coffee | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee index fdf084a8a82..0ae6e244602 100644 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ b/app/assets/javascripts/merge_request_tabs.js.coffee @@ -141,9 +141,7 @@ class @MergeRequestTabs url: "#{source}.json" success: (data) => document.querySelector("div#commits").innerHTML = data.html - $timeago = $('.js-timeago', 'div#commits') - gl.utils.updateFormatDate($timeago) - $timeago.timeago() + gl.utils.localTimeAgo($('.js-timeago', 'div#commits')) @commitsLoaded = true @scrollToElement("#commits") @@ -154,9 +152,7 @@ class @MergeRequestTabs url: "#{source}.json" + @_location.search success: (data) => document.querySelector("div#diffs").innerHTML = data.html - $timeago = $('.js-timeago', 'div#diffs') - gl.utils.updateFormatDate($timeago) - $timeago.timeago() + gl.utils.localTimeAgo($('.js-timeago', 'div#diffs')) $('div#diffs .js-syntax-highlight').syntaxHighlight() @expandViewContainer() if @diffViewType() is 'parallel' @diffsLoaded = true @@ -169,9 +165,7 @@ class @MergeRequestTabs url: "#{source}.json" success: (data) => document.querySelector("div#builds").innerHTML = data.html - $timeago = $('.js-timeago', 'div#builds') - gl.utils.updateFormatDate($timeago) - $timeago.timeago() + gl.utils.localTimeAgo($('.js-timeago', 'div#builds')) @buildsLoaded = true @scrollToElement("#builds") |