Skip to content

Commit

Permalink
Merge pull request #31 from schungx/master
Browse files Browse the repository at this point in the history
Fixed retort to work with latest Discourse.
  • Loading branch information
gdpelican committed Sep 27, 2017
2 parents 10b9820 + 747bed4 commit d56f9d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions assets/javascripts/discourse/components/retort-picker.js.es6
Expand Up @@ -4,7 +4,6 @@ import { emojiUrlFor } from 'discourse/lib/text'
const siteSettings = Discourse.SiteSettings

export default EmojiPicker.extend({

_scrollTo() {
if (siteSettings.retort_limited_emoji_set) {
return
Expand All @@ -15,11 +14,11 @@ export default EmojiPicker.extend({

_loadCategoriesEmojis() {
if (siteSettings.retort_limited_emoji_set) {
const $picker = $('.emoji-picker')
const $picker = this.$('.emoji-picker')
$picker.html("")
siteSettings.retort_allowed_emojis.split('|').map((code) => {
$picker.append(`<button type="button" title="${code}" class="emoji" />`)
$(`button.emoji[title="${code}"]`).css("background-image", `url("${emojiUrlFor(code)}")`)
this.$(`button.emoji[title="${code}"]`).css("background-image", `url("${emojiUrlFor(code)}")`)
})
this._bindEmojiClick($picker);
} else {
Expand Down

0 comments on commit d56f9d1

Please sign in to comment.