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/packages/rocketchat-ui-admin/admin/adminFlex.coffee

31 lines
895 B

Template.adminFlex.onCreated ->
if not RocketChat.settings.cachedCollectionPrivate?
RocketChat.settings.cachedCollectionPrivate = new RocketChat.CachedCollection({ name: 'private-settings', eventType: 'onAll' })
RocketChat.settings.collectionPrivate = RocketChat.settings.cachedCollectionPrivate.collection
RocketChat.settings.cachedCollectionPrivate.init()
Template.adminFlex.helpers
groups: ->
return RocketChat.settings.collectionPrivate.find({type: 'group'}, { sort: { sort: 1, i18nLabel: 1 } }).fetch()
label: ->
return TAPi18n.__(@i18nLabel or @_id)
adminBoxOptions: ->
return RocketChat.AdminBox.getOptions()
Template.adminFlex.events
'mouseenter header': ->
SideNav.overArrow()
'mouseleave header': ->
SideNav.leaveArrow()
'click header': ->
SideNav.closeFlex()
'click .cancel-settings': ->
SideNav.closeFlex()
'click .admin-link': ->
menu.close()