[FIX] dropdown tracking not showing in groups

This commit is contained in:
Joffrey JAFFEUX 2017-10-20 05:34:10 -07:00 committed by GitHub
parent fe1e78ddf4
commit fd7af2e146
2 changed files with 14 additions and 17 deletions

View File

@ -1,17 +0,0 @@
import NotificationOptionsComponent from "discourse/components/notifications-button";
export default NotificationOptionsComponent.extend({
classNames: ["group-notifications-button"],
value: Em.computed.alias("group.group_user.notification_level"),
i18nPrefix: "groups.notifications",
actions: {
onSelect(content) {
this._super(content);
this.get("group").setNotification(this.get("value"), this.get("user.id"));
}
}
});

View File

@ -0,0 +1,14 @@
import NotificationOptionsComponent from "select-box-kit/components/notifications-button";
export default NotificationOptionsComponent.extend({
classNames: ["group-notifications-button"],
value: Ember.computed.alias("group.group_user.notification_level"),
i18nPrefix: "groups.notifications",
actions: {
onSelect(value) {
value = this.defaultOnSelect(value);
this.get("group").setNotification(value, this.get("user.id"));
}
}
});