diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-08-16 20:34:49 -0500 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-08-16 20:34:49 -0500 |
commit | e5f9fdf90c1d59a07f76919e9d94599b494ac50f (patch) | |
tree | 2d1c8275733fc39005368a5d15366211b321ffa5 | |
parent | 30d578f6345c3807158e16eb73b28f290e416d16 (diff) | |
download | gitlab-ce-e5f9fdf90c1d59a07f76919e9d94599b494ac50f.tar.gz |
Refactor merge_request-tabs
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index a21cdbc8a10..1bba69a255a 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -188,14 +188,12 @@ } return this._get({ url: source + ".json", - success: (function(_this) { - return function(data) { - document.querySelector("div#pipelines").innerHTML = data.html; - gl.utils.localTimeAgo($('.js-timeago', 'div#pipelines')); - _this.pipelinesLoaded = true; - return _this.scrollToElement("#pipelines"); - }; - })(this) + success: function(data) { + $('#pipelines').html(data.html); + gl.utils.localTimeAgo($('.js-timeago', '#pipelines')); + this.pipelinesLoaded = true; + return this.scrollToElement("#pipelines"); + }.bind(this) }); }; |