From 71c67c43a111a8c060350d7bd8586c367477fc4b Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 16 Jul 2014 13:19:47 -0400 Subject: [PATCH] ES6: User activity views --- .../discourse/controllers/user-activity.js.es6 | 12 +----------- .../discourse/initializers/deprecations.js.es6 | 3 ++- .../discourse/initializers/view-helpers.js.es6 | 3 ++- .../templates/user/user.js.handlebars | 4 ++-- ...y_filter_view.js => activity-filter.js.es6} | 13 +------------ .../user_stream_view.js => user-stream.js.es6} | 17 +++++++---------- .../discourse/views/user/user_activity_view.js | 18 ------------------ 7 files changed, 15 insertions(+), 55 deletions(-) rename app/assets/javascripts/discourse/views/{user/activity_filter_view.js => activity-filter.js.es6} (86%) rename app/assets/javascripts/discourse/views/{user/user_stream_view.js => user-stream.js.es6} (65%) delete mode 100644 app/assets/javascripts/discourse/views/user/user_activity_view.js diff --git a/app/assets/javascripts/discourse/controllers/user-activity.js.es6 b/app/assets/javascripts/discourse/controllers/user-activity.js.es6 index e8f2cef7c19..5ca4a2c2ca1 100644 --- a/app/assets/javascripts/discourse/controllers/user-activity.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-activity.js.es6 @@ -1,11 +1 @@ -/** - This controller supports all actions on a user's activity stream - - @class UserActivityController - @extends Discourse.Controller - @namespace Discourse - @module Discourse -**/ -export default Discourse.ObjectController.extend({ - needs: ['composer'] -}); +export default Ember.ObjectController.extend(); diff --git a/app/assets/javascripts/discourse/initializers/deprecations.js.es6 b/app/assets/javascripts/discourse/initializers/deprecations.js.es6 index 20d15cba1f3..edb80811436 100644 --- a/app/assets/javascripts/discourse/initializers/deprecations.js.es6 +++ b/app/assets/javascripts/discourse/initializers/deprecations.js.es6 @@ -5,7 +5,8 @@ var deprecatedViewHelpers = { userSelector: 'user-selector', combobox: 'combo-box', categoryChooser: 'category-chooser', - chooseTopic: 'choose-topic' + chooseTopic: 'choose-topic', + 'discourse-activity-filter': 'activity-filter' }; export default { diff --git a/app/assets/javascripts/discourse/initializers/view-helpers.js.es6 b/app/assets/javascripts/discourse/initializers/view-helpers.js.es6 index 1a79d2b3cb1..05ecb44daf7 100644 --- a/app/assets/javascripts/discourse/initializers/view-helpers.js.es6 +++ b/app/assets/javascripts/discourse/initializers/view-helpers.js.es6 @@ -4,7 +4,8 @@ var helpers = ['input-tip', 'user-selector', 'category-chooser', 'combo-box', - 'choose-topic']; + 'choose-topic', + 'activity-filter']; /** Creates view helpers for some views. Many of these should probably be converted diff --git a/app/assets/javascripts/discourse/templates/user/user.js.handlebars b/app/assets/javascripts/discourse/templates/user/user.js.handlebars index a95f6462b57..63713e09370 100644 --- a/app/assets/javascripts/discourse/templates/user/user.js.handlebars +++ b/app/assets/javascripts/discourse/templates/user/user.js.handlebars @@ -9,9 +9,9 @@