This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/edit-category-tab.js.es6

18 lines
434 B
JavaScript

export default Em.Component.extend({
tagName: 'li',
classNameBindings: ['active'],
active: Discourse.computed.propertyEqual('selectedTab', 'tab'),
title: Discourse.computed.i18n('tab', 'category.%@'),
_insertInParent: function() {
this.get('parentView.panels').addObject(this.get('tab'));
}.on('didInsertElement'),
actions: {
select: function() {
this.set('selectedTab', this.get('tab'));
}
}
});