Welcome to mirror list, hosted at ThFree Co, Russian Federation.

aside.js.coffee « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 854731019443e3ea1d49e73a3fa5a12e5fc00185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class @Aside
  constructor: ->
    $(document).off "click", "a.show-aside"
    $(document).on "click", 'a.show-aside', (e) ->
      e.preventDefault()
      btn = $(e.currentTarget)
      icon = btn.find('i')
      console.log('1')

      if icon.hasClass('fa-angle-left')
        btn.parent().find('section').hide()
        btn.parent().find('aside').fadeIn()
        icon.removeClass('fa-angle-left').addClass('fa-angle-right')
      else
        btn.parent().find('aside').hide()
        btn.parent().find('section').fadeIn()
        icon.removeClass('fa-angle-right').addClass('fa-angle-left')