diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-04-12 23:13:39 +0300 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-04-12 23:13:39 +0300 |
commit | 6e366996673af2a439557e61cee4bafcbe6c0df8 (patch) | |
tree | 143743603182a37ddd779f8573b41f32964e9683 | |
parent | 43c719b4631e6394818b7bb33dcf1ec199aa05ca (diff) |
More possible culprits.
-rw-r--r-- | app/assets/javascripts/awards_handler.js | 8 | ||||
-rw-r--r-- | app/assets/javascripts/diff_notes/components/jump_to_discussion.js | 6 | ||||
-rw-r--r-- | app/assets/javascripts/line_highlighter.js | 10 | ||||
-rw-r--r-- | app/assets/javascripts/main.js | 16 | ||||
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 14 | ||||
-rw-r--r-- | app/assets/javascripts/notes.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/right_sidebar.js | 12 | ||||
-rw-r--r-- | app/assets/javascripts/zen_mode.js | 22 |
8 files changed, 45 insertions, 45 deletions
diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js index 461eed4a967..ace80771a1f 100644 --- a/app/assets/javascripts/awards_handler.js +++ b/app/assets/javascripts/awards_handler.js @@ -443,10 +443,10 @@ AwardsHandler.prototype.findEmojiIcon = function findEmojiIcon(votesBlock, emoji }; AwardsHandler.prototype.scrollToAwards = function scrollToAwards() { - const options = { - scrollTop: $('.awards').offset().top - 110, - }; - return $('body, html').animate(options, 200); + // const options = { + // scrollTop: $('.awards').offset().top - 110, + // }; + // return $('body, html').animate(options, 200); }; AwardsHandler.prototype.normalizeEmojiName = function normalizeEmojiName(emoji) { diff --git a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js index 8edc45130fc..a48aed320dd 100644 --- a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js +++ b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js @@ -181,9 +181,9 @@ import Vue from 'vue'; } } - $.scrollTo($target, { - offset: 0 - }); + // $.scrollTo($target, { + // offset: 0 + // }); } }, created() { diff --git a/app/assets/javascripts/line_highlighter.js b/app/assets/javascripts/line_highlighter.js index 1821ca18053..cf41d5beed5 100644 --- a/app/assets/javascripts/line_highlighter.js +++ b/app/assets/javascripts/line_highlighter.js @@ -57,11 +57,11 @@ require('vendor/jquery.scrollTo'); range = this.hashToRange(hash); if (range[0]) { this.highlightRange(range); - $.scrollTo("#L" + range[0], { - // Scroll to the first highlighted line on initial load - // Offset -50 for the sticky top bar, and another -100 for some context - offset: -150 - }); + // $.scrollTo("#L" + range[0], { + // // Scroll to the first highlighted line on initial load + // // Offset -50 for the sticky top bar, and another -100 for some context + // offset: -150 + // }); } } } diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index c50ec24c818..521281bdd16 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -251,17 +251,17 @@ $(function () { }); // Initialize tooltips $.fn.tooltip.Constructor.DEFAULTS.trigger = 'hover'; - $body.tooltip({ - selector: '.has-tooltip, [data-toggle="tooltip"]', - placement: function (tip, el) { - return $(el).data('placement') || 'bottom'; - } - }); + // $body.tooltip({ + // selector: '.has-tooltip, [data-toggle="tooltip"]', + // placement: function (tip, el) { + // return $(el).data('placement') || 'bottom'; + // } + // }); $('.trigger-submit').on('change', function () { return $(this).parents('form').submit(); // Form submitter }); - gl.utils.localTimeAgo($('abbr.timeago, .js-timeago'), true); + // gl.utils.localTimeAgo($('abbr.timeago, .js-timeago'), true); // Flash if ($flash.length > 0) { $flash.click(function () { @@ -361,5 +361,5 @@ $(function () { gl.utils.initTimeagoTimeout(); - $(document).trigger('init.scrolling-tabs'); + // $(document).trigger('init.scrolling-tabs'); }); diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 9eadf3e06bf..13b8b50a214 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -152,13 +152,13 @@ import './flash'; } scrollToElement(container) { - if (location.hash) { - const offset = -$('.js-tabs-affix').outerHeight(); - const $el = $(`${container} ${location.hash}:not(.match)`); - if ($el.length) { - $.scrollTo($el[0], { offset }); - } - } + // if (location.hash) { + // const offset = -$('.js-tabs-affix').outerHeight(); + // const $el = $(`${container} ${location.hash}:not(.match)`); + // if ($el.length) { + // $.scrollTo($el[0], { offset }); + // } + // } } // Activate a tab based on the current action diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index fd75bbf97f6..966b3da8903 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -580,7 +580,7 @@ require('./task_list'); var isWidgetVisible = gl.utils.isInViewport($el.get(0)); if (!isWidgetVisible) { - gl.utils.scrollToElement($el); + // gl.utils.scrollToElement($el); } $el.find('.js-edit-warning').show(); diff --git a/app/assets/javascripts/right_sidebar.js b/app/assets/javascripts/right_sidebar.js index 102f0b52064..c55f3d92765 100644 --- a/app/assets/javascripts/right_sidebar.js +++ b/app/assets/javascripts/right_sidebar.js @@ -211,12 +211,12 @@ import Cookies from 'js-cookie'; Sidebar.prototype.setSidebarHeight = function() { const $navHeight = $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight() + $('.sub-nav-scroll').outerHeight(); const $rightSidebar = $('.js-right-sidebar'); - const diff = $navHeight - $(window).scrollTop(); - if (diff > 0) { - $rightSidebar.outerHeight($(window).height() - diff); - } else { - $rightSidebar.outerHeight('100%'); - } + // const diff = $navHeight - $(window).scrollTop(); + // if (diff > 0) { + // $rightSidebar.outerHeight($(window).height() - diff); + // } else { + // $rightSidebar.outerHeight('100%'); + // } }; Sidebar.prototype.isOpen = function() { diff --git a/app/assets/javascripts/zen_mode.js b/app/assets/javascripts/zen_mode.js index ce626cf7b46..fbdbecdf3f0 100644 --- a/app/assets/javascripts/zen_mode.js +++ b/app/assets/javascripts/zen_mode.js @@ -76,20 +76,20 @@ require('mousetrap/plugins/pause/mousetrap-pause'); }; ZenMode.prototype.exit = function() { - if (this.active_textarea) { - Mousetrap.unpause(); - this.active_textarea.closest('.zen-backdrop').removeClass('fullscreen'); - this.scrollTo(this.active_textarea); - this.active_textarea = null; - this.active_backdrop = null; - return Dropzone.forElement('.div-dropzone').enable(); - } + // if (this.active_textarea) { + // Mousetrap.unpause(); + // this.active_textarea.closest('.zen-backdrop').removeClass('fullscreen'); + // this.scrollTo(this.active_textarea); + // this.active_textarea = null; + // this.active_backdrop = null; + // return Dropzone.forElement('.div-dropzone').enable(); + // } }; ZenMode.prototype.scrollTo = function(zen_area) { - return $.scrollTo(zen_area, 0, { - offset: -150 - }); + // return $.scrollTo(zen_area, 0, { + // offset: -150 + // }); }; return ZenMode; |