ES6: A few more views

This commit is contained in:
Robin Ward 2014-06-19 12:43:54 -04:00
parent 7d58c43006
commit 194b04917a
6 changed files with 10 additions and 10 deletions

View File

@ -7,7 +7,7 @@
@module Discourse
**/
export default Discourse.Controller.extend({
needs: ['modal', 'topic', 'composerMessages'],
needs: ['modal', 'topic', 'composer-messages'],
replyAsNewTopicDraft: Em.computed.equal('model.draftKey', Discourse.Composer.REPLY_AS_NEW_TOPIC_KEY),
checkedMessages: false,
@ -197,7 +197,7 @@ export default Discourse.Controller.extend({
if (this.present('model.reply')) {
// Notify the composer messages controller that a reply has been typed. Some
// messages only appear after typing.
this.get('controllers.composerMessages').typedReply();
this.get('controllers.composer-messages').typedReply();
}
},
@ -219,7 +219,7 @@ export default Discourse.Controller.extend({
if (body.length < Discourse.SiteSettings.min_body_similar_length ||
title.length < Discourse.SiteSettings.min_title_similar_length) { return; }
var messageController = this.get('controllers.composerMessages'),
var messageController = this.get('controllers.composer-messages'),
similarTopics = this.get('similarTopics');
Discourse.Topic.findSimilarTo(title, body).then(function (newTopics) {
@ -260,7 +260,7 @@ export default Discourse.Controller.extend({
throw "composer opened without a proper draft key";
}
var composerMessages = this.get('controllers.composerMessages'),
var composerMessages = this.get('controllers.composer-messages'),
self = this,
composerModel = this.get('model');
@ -327,7 +327,7 @@ export default Discourse.Controller.extend({
this.set('model', composerModel);
composerModel.set('composeState', Discourse.Composer.OPEN);
var composerMessages = this.get('controllers.composerMessages');
var composerMessages = this.get('controllers.composer-messages');
composerMessages.queryFor(composerModel);
},

View File

@ -2,7 +2,7 @@
<div class='contents'>
{{render "composerMessages"}}
{{render "composer-messages"}}
<div class='control'>
<a href='#' class='toggler' {{action toggle bubbles=false}} title='{{i18n composer.toggler}}'></a>

View File

@ -93,7 +93,7 @@
{{else}}
{{#if postStream.loadedAllPosts}}
{{view Discourse.TopicClosingView topicBinding="model"}}
{{view 'topic-closing' topic=model}}
{{view Discourse.TopicFooterButtonsView topicBinding="model"}}
{{#if details.suggested_topics.length}}

View File

@ -6,7 +6,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.ComposerMessagesView = Ember.CollectionView.extend({
export default Ember.CollectionView.extend({
classNameBindings: [':composer-popup-container', 'hidden'],
content: Em.computed.alias('controller.content'),

View File

@ -6,7 +6,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.ShareView = Discourse.View.extend({
export default Discourse.View.extend({
templateName: 'share',
elementId: 'share-link',
classNameBindings: ['hasLink'],

View File

@ -7,7 +7,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.TopicClosingView = Discourse.View.extend({
export default Discourse.View.extend({
elementId: 'topic-closing-info',
delayedRerender: null,