diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-02-09 13:22:38 -0600 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-02-10 15:09:08 -0600 |
commit | c34517ad8b5248a6c40eb59152347c45ac0d0ec8 (patch) | |
tree | 1746c4a65e4a3ce1023dd5ed1fb84f7a1619ff4d /app/assets | |
parent | 5430849ca55192b78f7bfb35fdabaa3356e15035 (diff) | |
download | gitlab-ce-c34517ad8b5248a6c40eb59152347c45ac0d0ec8.tar.gz |
Add js prefix to right sidebar
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/lib/utils/common_utils.js.es6 | 3 | ||||
-rw-r--r-- | app/assets/javascripts/sidebar.js.es6 | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js.es6 b/app/assets/javascripts/lib/utils/common_utils.js.es6 index 2d4f1d3dbe7..bcb3a706b51 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js.es6 +++ b/app/assets/javascripts/lib/utils/common_utils.js.es6 @@ -69,6 +69,9 @@ var hash = w.gl.utils.getLocationHash(); if (!hash) return; + // This is required to handle non-unicode characters in hash + hash = decodeURIComponent(hash); + // scroll to user-generated markdown anchor if we cannot find a match if (document.getElementById(hash) === null) { var target = document.getElementById('user-content-' + hash); diff --git a/app/assets/javascripts/sidebar.js.es6 b/app/assets/javascripts/sidebar.js.es6 index d0ddb5be099..33e4b7db681 100644 --- a/app/assets/javascripts/sidebar.js.es6 +++ b/app/assets/javascripts/sidebar.js.es6 @@ -71,9 +71,9 @@ const $navHeight = $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight(); const diff = $navHeight - $('body').scrollTop(); if (diff > 0) { - $('.right-sidebar').outerHeight($(window).height() - diff); + $('.js-right-sidebar').outerHeight($(window).height() - diff); } else { - $('.right-sidebar').outerHeight('100%'); + $('.js-right-sidebar').outerHeight('100%'); } } |