diff --git a/README.md b/README.md index f7e0ba3..cee9cc8 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ If you are not using Font Awesome for icons, you should replace the icons with c ```javascript spinnerIconURL: '', noCommentsIconURL: '', +closeIconURL: '', upvoteIconURL: '', // Only if upvoting is enabled replyIconURL: '', // Only if replying is enabled uploadIconURL: '', // Only if attachments are enabled diff --git a/js/jquery-comments.js b/js/jquery-comments.js index 604b306..cd6e949 100644 --- a/js/jquery-comments.js +++ b/js/jquery-comments.js @@ -125,6 +125,7 @@ attachmentIconURL: '', fileIconURL: '', noCommentsIconURL: '', + closeIconURL: '', // Strings to be formatted (for example localization) textareaPlaceholderText: 'Add a comment', @@ -1330,7 +1331,14 @@ // Close button var closeButton = $('', { 'class': 'close inline-button' - }).append($('')).append($('')); + }) + + var closeIcon = $(''); + if (this.options.closeIconURL.length) { + closeIcon.css('background-image', 'url("'+this.options.closeIconURL+'")'); + closeIcon.addClass('image'); + } + closeButton.append(closeIcon); // Save button text if(existingCommentId) {