From ab80240900d8c583969b01b5d68b9263c422204c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 12 May 2015 10:49:05 +0200 Subject: [PATCH] FIX: Presence mixin was missing sometimes --- .../admin/controllers/admin-logs-screened-emails.js.es6 | 3 +-- .../admin/controllers/admin-logs-screened-ip-addresses.js.es6 | 3 +-- .../admin/controllers/admin-logs-screened-urls.js.es6 | 3 +-- .../admin/controllers/admin-logs-staff-action-logs.js.es6 | 3 +-- .../javascripts/discourse/controllers/change-owner.js.es6 | 3 ++- app/assets/javascripts/discourse/controllers/composer.js.es6 | 4 +++- app/assets/javascripts/discourse/controllers/invite.js.es6 | 3 ++- .../javascripts/discourse/controllers/merge-topic.js.es6 | 3 ++- .../discourse/controllers/preferences/username.js.es6 | 3 ++- .../javascripts/discourse/controllers/split-topic.js.es6 | 3 ++- 10 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/assets/javascripts/admin/controllers/admin-logs-screened-emails.js.es6 b/app/assets/javascripts/admin/controllers/admin-logs-screened-emails.js.es6 index c744f96c48b..5bf47ac421d 100644 --- a/app/assets/javascripts/admin/controllers/admin-logs-screened-emails.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-logs-screened-emails.js.es6 @@ -1,7 +1,6 @@ -import Presence from 'discourse/mixins/presence'; import { outputExportResult } from 'discourse/lib/export-result'; -export default Ember.ArrayController.extend(Presence, { +export default Ember.ArrayController.extend({ loading: false, actions: { diff --git a/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 b/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 index 1bc35969730..54eda1a5028 100644 --- a/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-logs-screened-ip-addresses.js.es6 @@ -1,7 +1,6 @@ -import Presence from 'discourse/mixins/presence'; import { outputExportResult } from 'discourse/lib/export-result'; -export default Ember.ArrayController.extend(Presence, { +export default Ember.ArrayController.extend({ loading: false, itemController: 'admin-log-screened-ip-address', filter: null, diff --git a/app/assets/javascripts/admin/controllers/admin-logs-screened-urls.js.es6 b/app/assets/javascripts/admin/controllers/admin-logs-screened-urls.js.es6 index 06839b74565..a19701b13c3 100644 --- a/app/assets/javascripts/admin/controllers/admin-logs-screened-urls.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-logs-screened-urls.js.es6 @@ -1,7 +1,6 @@ -import Presence from 'discourse/mixins/presence'; import { outputExportResult } from 'discourse/lib/export-result'; -export default Ember.ArrayController.extend(Presence, { +export default Ember.ArrayController.extend({ loading: false, show() { diff --git a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 index e3f56d57865..c51db8204e9 100644 --- a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 @@ -1,7 +1,6 @@ -import Presence from 'discourse/mixins/presence'; import { outputExportResult } from 'discourse/lib/export-result'; -export default Ember.ArrayController.extend(Presence, { +export default Ember.ArrayController.extend({ loading: false, filters: null, diff --git a/app/assets/javascripts/discourse/controllers/change-owner.js.es6 b/app/assets/javascripts/discourse/controllers/change-owner.js.es6 index 63f86045e97..f01dd713aa1 100644 --- a/app/assets/javascripts/discourse/controllers/change-owner.js.es6 +++ b/app/assets/javascripts/discourse/controllers/change-owner.js.es6 @@ -1,8 +1,9 @@ +import Presence from 'discourse/mixins/presence'; import ModalFunctionality from 'discourse/mixins/modal-functionality'; import ObjectController from 'discourse/controllers/object'; // Modal related to changing the ownership of posts -export default ObjectController.extend(Discourse.SelectedPostsCount, ModalFunctionality, { +export default ObjectController.extend(Presence, Discourse.SelectedPostsCount, ModalFunctionality, { needs: ['topic'], topicController: Em.computed.alias('controllers.topic'), diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index fff3050c337..c6de8fd9627 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -1,4 +1,6 @@ -export default Ember.ObjectController.extend({ +import Presence from 'discourse/mixins/presence'; + +export default Ember.ObjectController.extend(Presence, { needs: ['modal', 'topic', 'composer-messages', 'application'], replyAsNewTopicDraft: Em.computed.equal('model.draftKey', Discourse.Composer.REPLY_AS_NEW_TOPIC_KEY), diff --git a/app/assets/javascripts/discourse/controllers/invite.js.es6 b/app/assets/javascripts/discourse/controllers/invite.js.es6 index 2201c3eb57d..ac1cc0628c3 100644 --- a/app/assets/javascripts/discourse/controllers/invite.js.es6 +++ b/app/assets/javascripts/discourse/controllers/invite.js.es6 @@ -1,7 +1,8 @@ +import Presence from 'discourse/mixins/presence'; import ModalFunctionality from 'discourse/mixins/modal-functionality'; import ObjectController from 'discourse/controllers/object'; -export default ObjectController.extend(ModalFunctionality, { +export default ObjectController.extend(Presence, ModalFunctionality, { needs: ['user-invited'], // If this isn't defined, it will proxy to the user model on the preferences diff --git a/app/assets/javascripts/discourse/controllers/merge-topic.js.es6 b/app/assets/javascripts/discourse/controllers/merge-topic.js.es6 index 658efcd5fc3..b99c31ceba0 100644 --- a/app/assets/javascripts/discourse/controllers/merge-topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/merge-topic.js.es6 @@ -1,8 +1,9 @@ +import Presence from 'discourse/mixins/presence'; import ModalFunctionality from 'discourse/mixins/modal-functionality'; import ObjectController from 'discourse/controllers/object'; // Modal related to merging of topics -export default ObjectController.extend(Discourse.SelectedPostsCount, ModalFunctionality, { +export default ObjectController.extend(Discourse.SelectedPostsCount, ModalFunctionality, Presence, { needs: ['topic'], topicController: Em.computed.alias('controllers.topic'), diff --git a/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 index c0bacaaa271..ed6699ad4a6 100644 --- a/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences/username.js.es6 @@ -1,6 +1,7 @@ +import Presence from 'discourse/mixins/presence'; import ObjectController from 'discourse/controllers/object'; -export default ObjectController.extend({ +export default ObjectController.extend(Presence, { taken: false, saving: false, error: false, diff --git a/app/assets/javascripts/discourse/controllers/split-topic.js.es6 b/app/assets/javascripts/discourse/controllers/split-topic.js.es6 index 7ef77020000..1e8d996fdce 100644 --- a/app/assets/javascripts/discourse/controllers/split-topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/split-topic.js.es6 @@ -1,8 +1,9 @@ +import Presence from 'discourse/mixins/presence'; import ModalFunctionality from 'discourse/mixins/modal-functionality'; import ObjectController from 'discourse/controllers/object'; // Modal related to auto closing of topics -export default ObjectController.extend(Discourse.SelectedPostsCount, ModalFunctionality, { +export default ObjectController.extend(Discourse.SelectedPostsCount, ModalFunctionality, Presence, { needs: ['topic'], topicController: Em.computed.alias('controllers.topic'),