diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-01-04 12:21:28 -0600 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-02-10 15:09:08 -0600 |
commit | a11e798aa0fdc2f67bdc0fc5ad611a6872af0e9f (patch) | |
tree | 56e38778e8681ac94a11df979b4a41390f3cf644 /app/assets/javascripts/build.js | |
parent | eefbc2bf738b9b715aad3777868d4dbeaadf612e (diff) | |
download | gitlab-ce-a11e798aa0fdc2f67bdc0fc5ad611a6872af0e9f.tar.gz |
Keep sidebars absolute until fixed at top; remove unneeded JS
Diffstat (limited to 'app/assets/javascripts/build.js')
-rw-r--r-- | app/assets/javascripts/build.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/app/assets/javascripts/build.js b/app/assets/javascripts/build.js index a378e5e27b8..eed447d54a0 100644 --- a/app/assets/javascripts/build.js +++ b/app/assets/javascripts/build.js @@ -67,6 +67,7 @@ Build.prototype.initSidebar = function() { this.$sidebar = $('.js-build-sidebar'); +<<<<<<< 36beffc12461d2e479ad8b000b7ba5b6ea40cd33 this.sidebarTranslationLimits = { <<<<<<< 3ee255139ab555ec49a177d3b2eed65580f36c4f min: $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight() @@ -80,9 +81,10 @@ this.$sidebar.css({ top: this.sidebarTranslationLimits.max }); +======= +>>>>>>> Keep sidebars absolute until fixed at top; remove unneeded JS this.$sidebar.niceScroll(); this.$document.off('click', '.js-sidebar-build-toggle').on('click', '.js-sidebar-build-toggle', this.toggleSidebar); - this.$document.off('scroll.translateSidebar').on('scroll.translateSidebar', this.translateSidebar.bind(this)); }; Build.prototype.location = function() { @@ -237,14 +239,6 @@ return bootstrapBreakpoint === 'xs' || bootstrapBreakpoint === 'sm'; }; - Build.prototype.translateSidebar = function(e) { - var newPosition = this.sidebarTranslationLimits.max - (document.body.scrollTop || document.documentElement.scrollTop); - if (newPosition < this.sidebarTranslationLimits.min) newPosition = this.sidebarTranslationLimits.min; - this.$sidebar.css({ - top: newPosition - }); - }; - Build.prototype.toggleSidebar = function(shouldHide) { var shouldShow = typeof shouldHide === 'boolean' ? !shouldHide : undefined; this.$buildScroll.toggleClass('sidebar-expanded', shouldShow) |