diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 48fd65504a..fd6e4dc173 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -190,6 +190,20 @@ define(['uploader'], function(uploader) { modified(inputEl); }); }); + + $('.admin-categories').delegate('.delete-image', 'click', function() { + var parent = $(this).parents('li[data-cid]'), + inputEl = parent.find('.upload-button'), + preview = parent.find('.preview-box'), + bgColor = parent.find('.category_bgColor').val(); + + inputEl.value = ''; + modified(inputEl); + + preview.css('background', bgColor); + + $(this).hide(); + }); }); }; diff --git a/public/templates/admin/categories.tpl b/public/templates/admin/categories.tpl index fe265658f8..a8da120e82 100644 --- a/public/templates/admin/categories.tpl +++ b/public/templates/admin/categories.tpl @@ -14,12 +14,15 @@