Server side implementation for bulk editing categories

This commit is contained in:
Robin Ward
2014-01-30 11:44:29 -05:00
parent b315a5c28f
commit 7564d9a20c
3 changed files with 71 additions and 3 deletions
@@ -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);
});