Put chatops panel enabled behind a setting in general and honor it

pull/1005/head
Aaron Ogle 11 years ago
parent c716f29b0b
commit ef13e7e00f
  1. 31
      packages/rocketchat-chatops/client/tabBar.coffee
  2. 2
      packages/rocketchat-chatops/server/settings.coffee

@ -10,20 +10,21 @@ Meteor.startup ->
# template: 'chatops'
# order: 4
console.log 'Adding chatops to tabbar'
RocketChat.TabBar.addButton
id: 'chatops-button2'
i18nTitle: 'rocketchat-chatops:Chatops_Title'
icon: 'octicon octicon-hubot'
template: 'chatops-dynamicUI'
order: 4
if RocketChat.settings.get('Chatops_Enabled')
console.log 'Adding chatops to tabbar'
RocketChat.TabBar.addButton
id: 'chatops-button2'
i18nTitle: 'rocketchat-chatops:Chatops_Title'
icon: 'octicon octicon-hubot'
template: 'chatops-dynamicUI'
order: 4
console.log 'Adding chatops to tabbar'
RocketChat.TabBar.addButton
id: 'chatops-button3'
i18nTitle: 'rocketchat-chatops:Chatops_Title'
icon: 'octicon octicon-inbox'
template: 'chatops_codemirror'
width: 675
order: 5
console.log 'Adding chatops to tabbar'
RocketChat.TabBar.addButton
id: 'chatops-button3'
i18nTitle: 'rocketchat-chatops:Chatops_Title'
icon: 'octicon octicon-inbox'
template: 'chatops_codemirror'
width: 675
order: 5
, RocketChat.callbacks.priority.MEDIUM, 'enter-room-tabbar-chatops'

@ -1,2 +1,2 @@
Meteor.startup ->
RocketChat.settings.add 'Chatops', true, { type: 'boolean', group: 'General', public: true, i18nLabel: "rocketchat-chatops:Chatops_Enabled" }
RocketChat.settings.add 'Chatops_Enabled', false, { type: 'boolean', group: 'General', public: true, i18nLabel: "rocketchat-chatops:Chatops_Enabled" }

Loading…
Cancel
Save