ES6: More views converted and deprecated

This commit is contained in:
Robin Ward 2014-06-12 11:13:05 -04:00
parent 39ab0ed0af
commit 61bba4d074
5 changed files with 7 additions and 8 deletions

View file

@ -4,7 +4,8 @@ var deprecatedViewHelpers = {
textField: 'text-field',
userSelector: 'user-selector',
combobox: 'combo-box',
categoryChooser: 'category-chooser'
categoryChooser: 'category-chooser',
chooseTopic: 'choose-topic'
};
export default {

View file

@ -3,7 +3,8 @@ var helpers = ['input-tip',
'text-field',
'user-selector',
'category-chooser',
'combo-box'];
'combo-box',
'choose-topic'];
/**
Creates view helpers for some views. Many of these should probably be converted

View file

@ -8,7 +8,7 @@
<p>{{{i18n topic.merge_topic.instructions count="selectedPostsCount"}}}</p>
<form>
{{chooseTopic selectedTopicId=selectedTopicId}}
{{choose-topic selectedTopicId=selectedTopicId}}
</form>
</div>

View file

@ -6,7 +6,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.ChooseTopicView = Discourse.View.extend({
export default Discourse.View.extend({
templateName: 'choose_topic',
topicTitleChanged: function() {
@ -53,6 +53,3 @@ Discourse.ChooseTopicView = Discourse.View.extend({
}
});
Discourse.View.registerHelper('chooseTopic', Discourse.ChooseTopicView);

View file

@ -7,7 +7,7 @@
@namespace Discourse
@module Discourse
**/
Discourse.DiscoveryTopicsView = Discourse.View.extend(Discourse.LoadMore, {
export default Discourse.View.extend(Discourse.LoadMore, {
eyelineSelector: '.topic-list-item',
actions: {