ES6: Most controllers converted over now.

This commit is contained in:
Robin Ward 2014-05-27 10:51:03 -04:00
parent 20c640355d
commit 663c57a0f0
7 changed files with 8 additions and 9 deletions

View File

@ -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')
});

View File

@ -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')
});

View File

@ -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() {

View File

@ -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'),

View File

@ -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');

View File

@ -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() {

View File

@ -62,7 +62,7 @@
{{/if}}
<tbody>
{{each topics itemController="topicListItem" itemViewClass="Discourse.TopicListItemView"}}
{{each topics itemController="topic-list-item" itemViewClass="Discourse.TopicListItemView"}}
</tbody>
</table>