const action = function(e, t) { $('button', e.currentTarget).blur(); e.preventDefault(); const $flexTab = $('.flex-tab-container .flex-tab'); if (t.tabBar.getState() === 'opened' && t.tabBar.getTemplate() === this.template) { $flexTab.attr('template', ''); return t.tabBar.close(); } $flexTab.attr('template', this.template); t.tabBar.setData({ label: this.i18nTitle, icon: this.icon, }); t.tabBar.open(this); popover.close(); };
tabBar: Template.instance().tabBar, }); }, embeddedVersion() { return RocketChat.Layout.isEmbedded(); }, }); const commonEvents = { 'click .js-action'(e, t) { $('button', e.currentTarget).blur(); e.preventDefault(); const $flexTab = $('.flex-tab-container .flex-tab'); if (t.tabBar.getState() === 'opened' && t.tabBar.getTemplate() === this.template) { $flexTab.attr('template', ''); return t.tabBar.close(); } $flexTab.attr('template', this.template); t.tabBar.setData({ label: this.i18nTitle, icon: this.icon, }); t.tabBar.open(this); popover.close(); }, }; const action = function(e, t) {