Make selectors more specific when setting the tab content

Reason: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2023
parent 0c54c9a8
...@@ -133,7 +133,7 @@ class @MergeRequestTabs ...@@ -133,7 +133,7 @@ class @MergeRequestTabs
@_get @_get
url: "#{source}.json" url: "#{source}.json"
success: (data) => success: (data) =>
document.getElementById('commits').innerHTML = data.html document.querySelector("div#commits").innerHTML = data.html
$('.js-timeago').timeago() $('.js-timeago').timeago()
@commitsLoaded = true @commitsLoaded = true
@scrollToElement("#commits") @scrollToElement("#commits")
...@@ -144,7 +144,7 @@ class @MergeRequestTabs ...@@ -144,7 +144,7 @@ class @MergeRequestTabs
@_get @_get
url: "#{source}.json" + @_location.search url: "#{source}.json" + @_location.search
success: (data) => success: (data) =>
document.getElementById('diffs').innerHTML = data.html document.querySelector("div#diffs").innerHTML = data.html
$('div#diffs .js-syntax-highlight').syntaxHighlight() $('div#diffs .js-syntax-highlight').syntaxHighlight()
@diffsLoaded = true @diffsLoaded = true
@scrollToElement("#diffs") @scrollToElement("#diffs")
...@@ -155,7 +155,7 @@ class @MergeRequestTabs ...@@ -155,7 +155,7 @@ class @MergeRequestTabs
@_get @_get
url: "#{source}.json" url: "#{source}.json"
success: (data) => success: (data) =>
document.getElementById('builds').innerHTML = data.html document.querySelector("div#builds").innerHTML = data.html
$('.js-timeago').timeago() $('.js-timeago').timeago()
@buildsLoaded = true @buildsLoaded = true
@scrollToElement("#builds") @scrollToElement("#builds")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment