diff --git a/.jshintignore b/.jshintignore index b0f6417b235..d22fa806efd 100644 --- a/.jshintignore +++ b/.jshintignore @@ -5,6 +5,7 @@ lib/javascripts/locale/ lib/javascripts/messageformat.js lib/javascripts/moment.js lib/javascripts/moment_locale/ +lib/es6_module_transpiler/support/es6-module-transpiler.js public/javascripts/ spec/phantom_js/smoke_test.js vendor/ diff --git a/app/assets/javascripts/discourse/controllers/group_index_controller.js b/app/assets/javascripts/discourse/controllers/group/index.js.es6 similarity index 91% rename from app/assets/javascripts/discourse/controllers/group_index_controller.js rename to app/assets/javascripts/discourse/controllers/group/index.js.es6 index ec2d196cb75..7cac5408459 100644 --- a/app/assets/javascripts/discourse/controllers/group_index_controller.js +++ b/app/assets/javascripts/discourse/controllers/group/index.js.es6 @@ -6,7 +6,7 @@ @namespace Discourse @module Discourse **/ -Discourse.GroupIndexController = Ember.ArrayController.extend({ +export default Ember.ArrayController.extend({ needs: ['group'], loading: false, diff --git a/app/assets/javascripts/discourse/controllers/group_post_controller.js b/app/assets/javascripts/discourse/controllers/group/post.js.es6 similarity index 85% rename from app/assets/javascripts/discourse/controllers/group_post_controller.js rename to app/assets/javascripts/discourse/controllers/group/post.js.es6 index 45d4553d559..fedecb6f5c1 100644 --- a/app/assets/javascripts/discourse/controllers/group_post_controller.js +++ b/app/assets/javascripts/discourse/controllers/group/post.js.es6 @@ -1,4 +1,4 @@ -Discourse.GroupPostController = Em.ObjectController.extend({ +export default Em.ObjectController.extend({ byName: function() { var result = "", diff --git a/app/assets/javascripts/discourse/controllers/invite_private_controller.js b/app/assets/javascripts/discourse/controllers/invite-private.js.es6 similarity index 92% rename from app/assets/javascripts/discourse/controllers/invite_private_controller.js rename to app/assets/javascripts/discourse/controllers/invite-private.js.es6 index 9ca61a42094..53d60e36c60 100644 --- a/app/assets/javascripts/discourse/controllers/invite_private_controller.js +++ b/app/assets/javascripts/discourse/controllers/invite-private.js.es6 @@ -7,7 +7,7 @@ @uses Discourse.ModalFunctionality @module Discourse **/ -Discourse.InvitePrivateController = Discourse.ObjectController.extend(Discourse.ModalFunctionality, { +export default Discourse.ObjectController.extend(Discourse.ModalFunctionality, { modalClass: 'invite', onShow: function(){ diff --git a/app/assets/javascripts/discourse/controllers/invite_controller.js b/app/assets/javascripts/discourse/controllers/invite.js.es6 similarity index 96% rename from app/assets/javascripts/discourse/controllers/invite_controller.js rename to app/assets/javascripts/discourse/controllers/invite.js.es6 index fb60d25d9bb..5e80c1fec28 100644 --- a/app/assets/javascripts/discourse/controllers/invite_controller.js +++ b/app/assets/javascripts/discourse/controllers/invite.js.es6 @@ -7,7 +7,7 @@ @uses Discourse.ModalFunctionality @module Discourse **/ -Discourse.InviteController = Discourse.ObjectController.extend(Discourse.ModalFunctionality, { +export default Discourse.ObjectController.extend(Discourse.ModalFunctionality, { /** Can we submit the form? diff --git a/app/assets/javascripts/discourse/controllers/keyboard_shortcuts_help_controller.js b/app/assets/javascripts/discourse/controllers/keyboard-shortcuts-help.js.es6 similarity index 77% rename from app/assets/javascripts/discourse/controllers/keyboard_shortcuts_help_controller.js rename to app/assets/javascripts/discourse/controllers/keyboard-shortcuts-help.js.es6 index 6eaec3359cd..4ad546e45be 100644 --- a/app/assets/javascripts/discourse/controllers/keyboard_shortcuts_help_controller.js +++ b/app/assets/javascripts/discourse/controllers/keyboard-shortcuts-help.js.es6 @@ -7,11 +7,10 @@ @uses Discourse.ModalFunctionality @module Discourse **/ -Discourse.KeyboardShortcutsHelpController = Discourse.Controller.extend(Discourse.ModalFunctionality, { +export default Discourse.Controller.extend(Discourse.ModalFunctionality, { needs: ['modal'], onShow: function() { this.set('controllers.modal.modalClass', 'keyboard-shortcuts-modal'); } - }); diff --git a/app/assets/javascripts/discourse/templates/group/index.js.handlebars b/app/assets/javascripts/discourse/templates/group/index.js.handlebars index afb673f8870..db2bad90e4b 100644 --- a/app/assets/javascripts/discourse/templates/group/index.js.handlebars +++ b/app/assets/javascripts/discourse/templates/group/index.js.handlebars @@ -1,5 +1,5 @@
- {{#each model itemController="groupPost"}} + {{#each model itemController="group/post"}}
{{#link-to 'user' user class="avatar-link"}}
{{avatar user imageSize="large" extraClasses="actor" ignoreTitle="true"}}
{{/link-to}}