diff --git a/app/assets/javascripts/discourse/controllers/bulk-notification-level.js.es6 b/app/assets/javascripts/discourse/controllers/bulk-notification-level.js.es6 index 87d698062dd..bde60c8eb57 100644 --- a/app/assets/javascripts/discourse/controllers/bulk-notification-level.js.es6 +++ b/app/assets/javascripts/discourse/controllers/bulk-notification-level.js.es6 @@ -7,7 +7,7 @@ @module Discourse **/ export default Em.Controller.extend({ - needs: ['topicBulkActions'], + needs: ['topic-bulk-actions'], notificationLevelId: null, @@ -27,7 +27,7 @@ export default Em.Controller.extend({ actions: { changeNotificationLevel: function() { - this.get('controllers.topicBulkActions').performAndRefresh({ + this.get('controllers.topic-bulk-actions').performAndRefresh({ type: 'change_notification_level', notification_level_id: this.get('notificationLevelId') }); diff --git a/app/assets/javascripts/discourse/controllers/topic_admin_menu_controller.js b/app/assets/javascripts/discourse/controllers/topic-admin-menu.js.es6 similarity index 85% rename from app/assets/javascripts/discourse/controllers/topic_admin_menu_controller.js rename to app/assets/javascripts/discourse/controllers/topic-admin-menu.js.es6 index e100e5d6f92..06b3db52cac 100644 --- a/app/assets/javascripts/discourse/controllers/topic_admin_menu_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic-admin-menu.js.es6 @@ -6,7 +6,7 @@ @namespace Discourse @module Discourse **/ -Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({ +export default Discourse.ObjectController.extend({ menuVisible: false, needs: ['modal'], @@ -21,5 +21,4 @@ Discourse.TopicAdminMenuController = Discourse.ObjectController.extend({ }, showRecover: Em.computed.and('deleted', 'details.can_recover') - }); diff --git a/app/assets/javascripts/discourse/controllers/topic_bulk_actions_controller.js b/app/assets/javascripts/discourse/controllers/topic-bulk-actions.js.es6 similarity index 95% rename from app/assets/javascripts/discourse/controllers/topic_bulk_actions_controller.js rename to app/assets/javascripts/discourse/controllers/topic-bulk-actions.js.es6 index f4180f85401..97dd5accc37 100644 --- a/app/assets/javascripts/discourse/controllers/topic_bulk_actions_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic-bulk-actions.js.es6 @@ -7,7 +7,7 @@ @uses Discourse.ModalFunctionality @module Discourse **/ -Discourse.TopicBulkActionsController = Ember.ArrayController.extend(Discourse.ModalFunctionality, { +export default Ember.ArrayController.extend(Discourse.ModalFunctionality, { needs: ['discovery/topics'], onShow: function() { diff --git a/app/assets/javascripts/discourse/controllers/topic_list_item_controller.js b/app/assets/javascripts/discourse/controllers/topic-list-item.js.es6 similarity index 95% rename from app/assets/javascripts/discourse/controllers/topic_list_item_controller.js rename to app/assets/javascripts/discourse/controllers/topic-list-item.js.es6 index 15db8dc509f..b0d0d7e9596 100644 --- a/app/assets/javascripts/discourse/controllers/topic_list_item_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic-list-item.js.es6 @@ -6,7 +6,7 @@ @namespace Discourse @module Discourse **/ -Discourse.TopicListItemController = Ember.ObjectController.extend({ +export default Ember.ObjectController.extend({ needs: ['discovery/topics'], canStar: Em.computed.alias('controllers.discovery/topics.currentUser.id'), diff --git a/app/assets/javascripts/discourse/controllers/user_controller.js b/app/assets/javascripts/discourse/controllers/user.js.es6 similarity index 94% rename from app/assets/javascripts/discourse/controllers/user_controller.js rename to app/assets/javascripts/discourse/controllers/user.js.es6 index bc7fb0f3207..e446f5957f7 100644 --- a/app/assets/javascripts/discourse/controllers/user_controller.js +++ b/app/assets/javascripts/discourse/controllers/user.js.es6 @@ -6,7 +6,7 @@ @namespace Discourse @module Discourse **/ -Discourse.UserController = Discourse.ObjectController.extend({ +export default Discourse.ObjectController.extend({ viewingSelf: function() { return this.get('content.username') === Discourse.User.currentProp('username'); diff --git a/app/assets/javascripts/discourse/routes/discovery_route.js b/app/assets/javascripts/discourse/routes/discovery_route.js index a8e78972980..3a5466e07c5 100644 --- a/app/assets/javascripts/discourse/routes/discovery_route.js +++ b/app/assets/javascripts/discourse/routes/discovery_route.js @@ -53,7 +53,7 @@ Discourse.DiscoveryRoute = Discourse.Route.extend(Discourse.ScrollTop, Discourse var controllerName = w.replace('modal/', ''), factory = this.container.lookupFactory('controller:' + controllerName); - this.render(w, {into: 'topicBulkActions', outlet: 'bulkOutlet', controller: factory ? controllerName : 'topicBulkActions'}); + this.render(w, {into: 'topicBulkActions', outlet: 'bulkOutlet', controller: factory ? controllerName : 'topic-bulk-actions'}); }, showBulkActions: function() { diff --git a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars index e683d469c33..a891a56d596 100644 --- a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars +++ b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars @@ -62,7 +62,7 @@ {{/if}} - {{each topics itemController="topicListItem" itemViewClass="Discourse.TopicListItemView"}} + {{each topics itemController="topic-list-item" itemViewClass="Discourse.TopicListItemView"}}