From 07cb3aff97f6650df521e216bd44bc0088b9497e Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 25 Jun 2014 16:34:57 -0400 Subject: [PATCH] We shouldn't have to redeclare tab panels in the category edit menu --- .../discourse/components/edit-category-tab.js.es6 | 4 ++++ .../templates/modal/edit-category.js.handlebars | 9 ++++----- .../discourse/views/edit-category-panel.js.es6 | 1 - .../javascripts/discourse/views/edit-category.js.es6 | 6 +++++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 b/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 index 02be5aa5e..0eaa00ff8 100644 --- a/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 +++ b/app/assets/javascripts/discourse/components/edit-category-tab.js.es6 @@ -5,6 +5,10 @@ export default Em.Component.extend({ 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')); diff --git a/app/assets/javascripts/discourse/templates/modal/edit-category.js.handlebars b/app/assets/javascripts/discourse/templates/modal/edit-category.js.handlebars index 40c1e83e5..e40e61f55 100644 --- a/app/assets/javascripts/discourse/templates/modal/edit-category.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/edit-category.js.handlebars @@ -8,12 +8,11 @@ +