mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: uncategorized category was not loading updates in edit mode
This commit is contained in:
parent
b9ff4a5e81
commit
88306cc112
1 changed files with 6 additions and 11 deletions
|
@ -132,18 +132,13 @@ var ApplicationRoute = Discourse.Route.extend({
|
|||
},
|
||||
|
||||
editCategory: function(category) {
|
||||
var router = this;
|
||||
var self = this;
|
||||
|
||||
if (category.get('isUncategorizedCategory')) {
|
||||
Discourse.Route.showModal(router, 'editCategory', category);
|
||||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
} else {
|
||||
Discourse.Category.reloadById(category.get('id')).then(function (c) {
|
||||
Discourse.Site.current().updateCategory(c);
|
||||
Discourse.Route.showModal(router, 'editCategory', c);
|
||||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
});
|
||||
}
|
||||
Discourse.Category.reloadById(category.get('id')).then(function (c) {
|
||||
self.site.updateCategory(c);
|
||||
Discourse.Route.showModal(self, 'editCategory', c);
|
||||
self.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue