ES6: Most controllers converted over now.
This commit is contained in:
parent
20c640355d
commit
663c57a0f0
|
@ -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')
|
||||
});
|
||||
|
|
|
@ -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')
|
||||
|
||||
});
|
|
@ -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() {
|
|
@ -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'),
|
|
@ -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');
|
|
@ -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() {
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
{{/if}}
|
||||
|
||||
<tbody>
|
||||
{{each topics itemController="topicListItem" itemViewClass="Discourse.TopicListItemView"}}
|
||||
{{each topics itemController="topic-list-item" itemViewClass="Discourse.TopicListItemView"}}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue