toggle sidebar when clicking the same again
This commit is contained in:
parent
83f1f7821d
commit
588a0a6cf4
1 changed files with 9 additions and 4 deletions
|
@ -294,13 +294,17 @@ class Sidebar extends App.Controller
|
||||||
toggleTab: (e) ->
|
toggleTab: (e) ->
|
||||||
|
|
||||||
name = $(e.target).closest('.sidebar-tab').data('content')
|
name = $(e.target).closest('.sidebar-tab').data('content')
|
||||||
|
|
||||||
if name
|
if name
|
||||||
@el.find('.ticket-zoom .sidebar-tab').removeClass('active')
|
if name is @currentTab
|
||||||
$(e.target).closest('.sidebar-tab').addClass('active')
|
@toggleSidebar()
|
||||||
|
else
|
||||||
|
@el.find('.ticket-zoom .sidebar-tab').removeClass('active')
|
||||||
|
$(e.target).closest('.sidebar-tab').addClass('active')
|
||||||
|
|
||||||
@toggleContent(name)
|
@toggleContent(name)
|
||||||
|
|
||||||
@showSidebar()
|
@showSidebar()
|
||||||
|
|
||||||
|
|
||||||
toggleContent: (name) ->
|
toggleContent: (name) ->
|
||||||
|
@ -309,6 +313,7 @@ class Sidebar extends App.Controller
|
||||||
@el.find('.sidebar-content[data-content=' + name + ']').removeClass('hide')
|
@el.find('.sidebar-content[data-content=' + name + ']').removeClass('hide')
|
||||||
title = @el.find('.sidebar-content[data-content=' + name + ']').data('title')
|
title = @el.find('.sidebar-content[data-content=' + name + ']').data('title')
|
||||||
@el.find('.sidebar h2').html(title)
|
@el.find('.sidebar h2').html(title)
|
||||||
|
@currentTab = name
|
||||||
|
|
||||||
|
|
||||||
class Edit extends App.Controller
|
class Edit extends App.Controller
|
||||||
|
|
Loading…
Reference in a new issue