The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/views/app/flexTabBar.coffee

39 lines
1.3 KiB

Template.flexTabBar.helpers
active: ->
return 'active' if @template is RocketChat.TabBar.getTemplate() and RocketChat.TabBar.isFlexOpen()
buttons: ->
RocketChat.TabBar.getButtons()
return RocketChat.TabBar.getButtons()
title: ->
return t(@i18nTitle) or @title
Template.flexTabBar.events
'click .tab-button': (e, t) ->
e.preventDefault()
if RocketChat.TabBar.isFlexOpen() and RocketChat.TabBar.getTemplate() is $(e.currentTarget).data('template')
RocketChat.TabBar.closeFlex()
$('.flex-tab').css('max-width', '')
else
width = $(e.currentTarget).data('width')
if width?
$('.flex-tab').css('max-width', "#{width}px")
else
$('.flex-tab').css('max-width', '')
RocketChat.TabBar.setTemplate $(e.currentTarget).data('template'), ->
$('.flex-tab')?.find("input[type='text']:first")?.focus()
$('.flex-tab .content')?.scrollTop(0)
# if Session.get('flexOpened') and Session.equals('whichFlexOpened', $(e.currentTarget).data('target'))
# Session.set('rtcLayoutmode', 0)
# Session.set('flexOpened',false)
# Session.set('whichFlexOpened')
# else
# $(e.currentTarget).addClass 'active'
# Session.set('flexOpened', true)
# Session.set('whichFlexOpened', $(e.currentTarget).data('target'))
# # $('.user-info-content').hide()
# # $($(e.currentTarget).attr('href')).show()