Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-11-11 00:24:52 +0300
committerMike Greiling <mike@pixelcog.com>2016-12-03 02:32:37 +0300
commit2de245c7bad211cd85a4a23f9110aac82f2bb0a2 (patch)
tree5db680b349ee47eee4bae00f026111c52a61e999 /app/assets/javascripts/merge_request_tabs.js
parent3ebb815a38ba86e4133557f77b94c292c8fc2e7e (diff)
temporarily revert "Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, added conditional force load if a collapsed diff line anchor is found"
This reverts commit d2ee380816fa161d94da54c1f7e594c9a2ba2241.
Diffstat (limited to 'app/assets/javascripts/merge_request_tabs.js')
-rw-r--r--app/assets/javascripts/merge_request_tabs.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js
index 4a192ca5796..907f8f924d2 100644
--- a/app/assets/javascripts/merge_request_tabs.js
+++ b/app/assets/javascripts/merge_request_tabs.js
@@ -240,11 +240,8 @@
_this.expandViewContainer();
}
_this.diffsLoaded = true;
- var anchoredDiff = gl.utils.getLocationHash();
- if (anchoredDiff) _this.openAnchoredDiff(anchoredDiff, function() {
- _this.scrollToElement("#diffs");
- _this.highlighSelectedLine();
- });
+ _this.scrollToElement("#diffs");
+ _this.highlighSelectedLine();
_this.filesCommentButton = $('.files .diff-file').filesCommentButton();
return $(document).off('click', '.diff-line-num a').on('click', '.diff-line-num a', function(e) {
e.preventDefault();
@@ -257,17 +254,6 @@
});
};
- MergeRequestTabs.prototype.openAnchoredDiff = function(anchoredDiff, cb) {
- var diffTitle = $('#file-path-' + anchoredDiff);
- var diffFile = diffTitle.closest('.diff-file');
- var nothingHereBlock = $('.nothing-here-block:visible', diffFile);
- if (nothingHereBlock.length) {
- diffFile.singleFileDiff(true, cb);
- } else {
- cb();
- }
- };
-
MergeRequestTabs.prototype.highlighSelectedLine = function() {
var $diffLine, diffLineTop, hashClassString, locationHash, navBarHeight;
$('.hll').removeClass('hll');