diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-18 11:38:12 -0500 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-05-25 17:14:28 -0500 |
commit | 77c7fb1469446c76c84ce5883d99e0e3debaf515 (patch) | |
tree | 7c7beb32479b21b743eacd7044a7b806cdb584eb | |
parent | 7876d27db8b330f3c5e306f1c2e657a8b0df8819 (diff) | |
download | gitlab-ce-77c7fb1469446c76c84ce5883d99e0e3debaf515.tar.gz |
Fix coffeescript; remove fade out div so area is clickable; remove scrollbar on chrome
-rw-r--r-- | app/assets/javascripts/layout_nav.js.coffee | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/nav.scss | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/layout_nav.js.coffee b/app/assets/javascripts/layout_nav.js.coffee index 613243427cc..2f14e3f35ac 100644 --- a/app/assets/javascripts/layout_nav.js.coffee +++ b/app/assets/javascripts/layout_nav.js.coffee @@ -2,8 +2,10 @@ class @LayoutNav $ -> $('#scrolling-tabs').on 'scroll', -> currentPosition = $(this).scrollLeft() - return if currentPosition == 0 + return if currentPosition is 0 + mobileScreenWidth = 480 + controlBtnWidth = $('.controls').width() maxPosition = $(this)[0].scrollWidth - $(this).parent().width() - maxPosition += 59 if $('.nav-control').length and window.innerWidth > 480 + maxPosition += controlBtnWidth if $('.nav-control').length and $(window).width() > mobileScreenWidth $('.fade-out').toggleClass('end-scroll', currentPosition is maxPosition) diff --git a/app/assets/stylesheets/framework/nav.scss b/app/assets/stylesheets/framework/nav.scss index 9f5f2f81b8c..bf5981bef8b 100644 --- a/app/assets/stylesheets/framework/nav.scss +++ b/app/assets/stylesheets/framework/nav.scss @@ -257,6 +257,7 @@ } .fade-out { + visibility: visible; opacity: 1; position: absolute; bottom: 16px; @@ -270,6 +271,7 @@ background: linear-gradient(left, rgba(250, 250, 250, 0.4), $background-color 45%); &.end-scroll { + visibility: hidden; opacity: 0; transition-duration: .3s; } |