Upgrade to Ember 3.7.0

This commit is contained in:
Maja Komel
2019-03-20 12:50:13 +01:00
parent f2c6a160e5
commit f3d0d8fe7d
33 changed files with 222 additions and 166 deletions

View File

@@ -1,5 +1,4 @@
import ComboBoxComponent from "select-kit/components/combo-box";
import { on } from "ember-addons/ember-computed-decorators";
import computed from "ember-addons/ember-computed-decorators";
import PermissionType from "discourse/models/permission-type";
import Category from "discourse/models/category";
@@ -100,16 +99,6 @@ export default ComboBoxComponent.extend({
return content;
},
@on("didRender")
_bindComposerResizing() {
this.appEvents.on("composer:resized", this, this.applyDirection);
},
@on("willDestroyElement")
_unbindComposerResizing() {
this.appEvents.off("composer:resized");
},
didSelect(computedContentItem) {
if (this.attrs.onChooseCategory) {
this.attrs.onChooseCategory(computedContentItem.originalContent);

View File

@@ -28,6 +28,6 @@ export default DropdownSelectBoxComponent.extend({
},
mutateValue(value) {
this.sendAction(value);
this.get(value)();
}
});

View File

@@ -134,10 +134,10 @@ export default Ember.Component.extend(
this.removeObserver(
`content.@each.${this.get("nameProperty")}`,
this,
this._compute
"_compute"
);
this.removeObserver(`content.[]`, this, this._compute);
this.removeObserver(`asyncContent.[]`, this, this._compute);
this.removeObserver(`content.[]`, this, "_compute");
this.removeObserver(`asyncContent.[]`, this, "_compute");
},
willComputeAttributes() {},

View File

@@ -17,20 +17,20 @@ export default NotificationOptionsComponent.extend({
return archetype === "private_message" ? "_pm" : "";
},
_changed(msg) {
if (this.get("computedValue") !== msg.id) {
this.get("topic.details").updateNotifications(msg.id);
}
},
@on("didInsertElement")
_bindGlobalLevelChanged() {
this.appEvents.on("topic-notifications-button:changed", msg => {
if (msg.type === "notification") {
if (this.get("computedValue") !== msg.id) {
this.get("topic.details").updateNotifications(msg.id);
}
}
});
this.appEvents.on("topic-notifications-button:changed", this, "_changed");
},
@on("willDestroyElement")
_unbindGlobalLevelChanged() {
this.appEvents.off("topic-notifications-button:changed");
this.appEvents.off("topic-notifications-button:changed", this, "_changed");
},
mutateValue(value) {