Skip to content

Node.js based forum software built for the modern web

fix:removing category images via ACP

Mega3947710a3d6f
diff --git a/public/src/admin/manage/category.js b/public/src/admin/manage/category.js
index e969b6e6d2..6e7cdb8b16 100644
--- a/public/src/admin/manage/category.js
+++ b/public/src/admin/manage/category.js
@@ -119,6 +119,18 @@ define('admin/manage/category', [
});
});
+ // Image Remover
+ $('.delete-image').on('click', function(e) {
+ e.preventDefault();
+
+ var inputEl = $('.upload-button'),
+ previewBox = inputEl.parent().parent().siblings('.category-preview');
+
+ inputEl.val('');
+ previewBox.css('background-image', '');
+ modified(inputEl[0]);
+ });
+
// Icon selection
$('.category-preview').on('click', function(ev) {
iconSelect.init($(this).find('i'), modified);