BUGFIX: could not save user's preferences when categories where watched/tracked/muted
This commit is contained in:
parent
92cb52e76e
commit
8e5b736caa
|
@ -15,10 +15,14 @@ Discourse.CategoryGroupComponent = Ember.Component.extend({
|
|||
});
|
||||
},
|
||||
onChangeItems: function(items) {
|
||||
self.set("categories", items);
|
||||
var categories = _.map(items, function(link) {
|
||||
var slug = link.match(/href=['"]\/category\/([^'"]+)/)[1];
|
||||
return Discourse.Category.findSingleBySlug(slug);
|
||||
});
|
||||
self.set("categories", categories);
|
||||
},
|
||||
template: Discourse.CategoryGroupComponent.templateFunction(),
|
||||
transformComplete: function(category){
|
||||
transformComplete: function(category) {
|
||||
return Discourse.HTML.categoryLink(category, {allowUncategorized: true});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -26,7 +26,6 @@ Discourse.User = Discourse.Model.extend({
|
|||
**/
|
||||
staff: Em.computed.or('admin', 'moderator'),
|
||||
|
||||
|
||||
searchContext: function() {
|
||||
return {
|
||||
type: 'user',
|
||||
|
|
Loading…
Reference in New Issue