mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-17 08:36:06 +10:00
Hide nav arrows by default ## What does this MR do? - Fixes the arrow icon flashing on page load - Removes settings dropdown at higher breakpoint - Removes unneeded CSS Closes #18941 ## Screenshots (if relevant) Arrow flashing bug:  Settings dropdown breaking nav: <img src="/uploads/4351035f4cf8cb9fd892b621e6339e50/Screen_Shot_2016-06-21_at_4.25.50_PM.png" width="800px"> @alfredo1 would you mind double checking this to make sure the arrow flashing is definitely not happening? See merge request !4843
25 lines
672 B
CoffeeScript
25 lines
672 B
CoffeeScript
hideEndFade = ($scrollingTabs) ->
|
|
$scrollingTabs.each ->
|
|
$this = $(@)
|
|
|
|
$this
|
|
.find('.fade-right')
|
|
.toggleClass('scrolling', $this.width() < $this.prop('scrollWidth'))
|
|
|
|
$ ->
|
|
|
|
hideEndFade($('.scrolling-tabs'))
|
|
|
|
$(window)
|
|
.off 'resize.nav'
|
|
.on 'resize.nav', ->
|
|
hideEndFade($('.scrolling-tabs'))
|
|
|
|
$('.scrolling-tabs').on 'scroll', (event) ->
|
|
$this = $(this)
|
|
currentPosition = $this.scrollLeft()
|
|
maxPosition = $this.prop('scrollWidth') - $this.outerWidth()
|
|
|
|
$this.find('.fade-left').toggleClass('scrolling', currentPosition > 0)
|
|
$this.find('.fade-right').toggleClass('scrolling', currentPosition < maxPosition - 1)
|