FIX: Recursion with a computed property that was pointing to itself.
This commit is contained in:
parent
d46fc79344
commit
411985de3b
|
@ -157,10 +157,6 @@ Discourse.Category = Discourse.Model.extend({
|
|||
return this.countStats('topics');
|
||||
}.property('posts_year', 'posts_month', 'posts_week', 'posts_day'),
|
||||
|
||||
notification_level: function() {
|
||||
return this.get('notification_level');
|
||||
}.property('notification_level'),
|
||||
|
||||
setNotification: function(notification_level) {
|
||||
var url = "/category/" + this.get('id')+"/notifications";
|
||||
this.set('notification_level', notification_level);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</ul>
|
||||
|
||||
{{#if canChangeCategoryNotificationLevel}}
|
||||
{{view Discourse.CategoryNotificationsButton categoryBinding="model" category=category}}
|
||||
{{view Discourse.CategoryNotificationsButton category=category}}
|
||||
{{/if}}
|
||||
|
||||
{{#if canCreateTopic}}
|
||||
|
|
|
@ -10,8 +10,6 @@ Discourse.CategoryNotificationsButton = Discourse.NotificationsButton.extend({
|
|||
classNames: ['notification-options', 'category-notification-menu'],
|
||||
buttonIncludesText: false,
|
||||
longDescriptionBinding: null,
|
||||
category: Em.computed.alias('controller.model'),
|
||||
target: Em.computed.alias('category'),
|
||||
hidden: Em.computed.alias('category.deleted'),
|
||||
notificationLevels: Discourse.Category.NotificationLevel,
|
||||
notificationLevel: Em.computed.alias('category.notification_level'),
|
||||
|
|
|
@ -12,8 +12,6 @@ test("Default List", function() {
|
|||
test("List one Category", function() {
|
||||
expect(2);
|
||||
|
||||
this.stub(Discourse.User, "current").returns(null);
|
||||
|
||||
visit("/category/bug").then(function() {
|
||||
ok(exists("#topic-list"), "The list of topics was rendered");
|
||||
ok(exists('#topic-list .topic-list-item'), "has topics");
|
||||
|
|
Loading…
Reference in New Issue