mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 12:02:59 +08:00
BUGFIX: could not save user's preferences when categories where watched/tracked/muted
This commit is contained in:
parent
92cb52e76e
commit
8e5b736caa
|
@ -15,7 +15,11 @@ Discourse.CategoryGroupComponent = Ember.Component.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onChangeItems: function(items) {
|
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(),
|
template: Discourse.CategoryGroupComponent.templateFunction(),
|
||||||
transformComplete: function(category) {
|
transformComplete: function(category) {
|
||||||
|
|
|
@ -26,7 +26,6 @@ Discourse.User = Discourse.Model.extend({
|
||||||
**/
|
**/
|
||||||
staff: Em.computed.or('admin', 'moderator'),
|
staff: Em.computed.or('admin', 'moderator'),
|
||||||
|
|
||||||
|
|
||||||
searchContext: function() {
|
searchContext: function() {
|
||||||
return {
|
return {
|
||||||
type: 'user',
|
type: 'user',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user