mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
added delete button to category image uploader in case you wanted to revert to bgColor
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user