diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-05-19 14:02:18 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-19 08:13:20 -0500 |
commit | 16c37592835dbd62ef47a7f149a3fe391611ea91 (patch) | |
tree | cca3d82aab4b0977eae60d435c06753038bb3b5e /app | |
parent | 4619901632ddb6f2881897e95aa69028c2e6632a (diff) | |
download | gitlab-ce-16c37592835dbd62ef47a7f149a3fe391611ea91.tar.gz |
Fixed merging conflict on the blob load viewer9-2-stable-fix-conflicts-for-mr-11427
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/blob/viewer/index.js | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/app/assets/javascripts/blob/viewer/index.js b/app/assets/javascripts/blob/viewer/index.js index fe6d02b68e2..28913ae4741 100644 --- a/app/assets/javascripts/blob/viewer/index.js +++ b/app/assets/javascripts/blob/viewer/index.js @@ -83,6 +83,7 @@ export default class BlobViewer { viewer.setAttribute('data-loaded', 'true'); this.$fileHolder.trigger('highlight:line'); + gl.utils.handleLocationHash(); this.toggleCopyButtonState(); }); @@ -115,45 +116,6 @@ export default class BlobViewer { this.toggleCopyButtonState(); -<<<<<<< HEAD this.loadViewer(newViewer); -======= - BlobViewer.loadViewer(newViewer) - .then((viewer) => { - $(viewer).syntaxHighlight(); - - this.$fileHolder.trigger('highlight:line'); - gl.utils.handleLocationHash(); - - this.toggleCopyButtonState(); - }) - .catch(() => new Flash('Error loading viewer')); - } - - static loadViewer(viewerParam) { - const viewer = viewerParam; - const url = viewer.getAttribute('data-url'); - - return new Promise((resolve, reject) => { - if (!url || viewer.getAttribute('data-loaded') || viewer.getAttribute('data-loading')) { - resolve(viewer); - return; - } - - viewer.setAttribute('data-loading', 'true'); - - $.ajax({ - url, - dataType: 'JSON', - }) - .fail(reject) - .done((data) => { - viewer.innerHTML = data.html; - viewer.setAttribute('data-loaded', 'true'); - - resolve(viewer); - }); - }); ->>>>>>> b957df9... Merge branch 'dm-scroll-to-blob-user-content' into 'master'
} } |