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

dashboard.js.coffee « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3bdb9469d06963521f4fd23c70e4ffdf55cb0f29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class @Dashboard
  constructor: ->
    @initSidebarTab()
    new ProjectsList()

  initSidebarTab: ->
    key = "dashboard_sidebar_filter"

    # store selection in cookie
    $('.dash-sidebar-tabs a').on 'click', (e) ->
      $.cookie(key, $(e.target).attr('id'))

    # show tab from cookie
    sidebar_filter = $.cookie(key)
    $("#" + sidebar_filter).tab('show') if sidebar_filter