From ab0d31bef13227774c97eea9916cb7469c3a530e Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 22 Aug 2014 19:21:20 -0400 Subject: [PATCH] closes #2005 --- public/src/forum/topic/move.js | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/public/src/forum/topic/move.js b/public/src/forum/topic/move.js index c94dfb40f2..11f82c85f3 100644 --- a/public/src/forum/topic/move.js +++ b/public/src/forum/topic/move.js @@ -90,24 +90,10 @@ define('forum/topic/move', function() { } function renderCategories(categories) { - var categoriesEl = modal.find('.category-list'), - info; - - for (var x = 0; x < categories.length; ++x) { - info = categories[x]; - if(parseInt(info.cid, 10) === parseInt(Move.currentCid, 10)) { - continue; - } - - $('
  • ') - .css({background: info.bgColor, color: info.color || '#fff'}) - .toggleClass('disabled', info.disabled) - .attr('data-cid', info.cid) - .html(' ' + info.name) - .appendTo(categoriesEl); - } - - $('#categories-loading').remove(); + templates.parse('partials/category_list', {categories: categories}, function(html) { + modal.find('.modal-body').prepend(html); + $('#categories-loading').remove(); + }); } return Move;