mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 13:17:20 -05:00
Server side implementation for bulk editing categories
This commit is contained in:
@@ -37,8 +37,9 @@ Discourse.TopicBulkActionsController = Ember.ArrayController.extend(Discourse.Mo
|
||||
|
||||
changeCategory: function() {
|
||||
var category = Discourse.Category.findById(parseInt(this.get('newCategoryId'), 10)),
|
||||
categoryName = (category ? category.get('name') : null),
|
||||
self = this;
|
||||
this.perform({type: 'change_category', category_id: this.get('newCategoryId')}).then(function(topics) {
|
||||
this.perform({type: 'change_category', category_name: categoryName}).then(function(topics) {
|
||||
topics.forEach(function(t) {
|
||||
t.set('category', category);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user