diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2019-03-14 10:18:18 +0100 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-04-10 11:49:06 -0700 |
commit | c57529556c2ba3053e3a622efc2f5b6eeaabe009 (patch) | |
tree | 1cb928c3fa9c214f083e2f8b1ccc292ebda438db /app/assets/javascripts/pages | |
parent | ddab30ad3561c6834fd779458ce89084c8a95ca5 (diff) | |
download | gitlab-ce-c57529556c2ba3053e3a622efc2f5b6eeaabe009.tar.gz |
Revert "Merge branch 'tz-reorganise-digests-json' into 'master'"tz-revert-new-emojis-loading
Reverts the loading of emojis and its images to move forward with RC
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/profiles/show/index.js | 48 |
1 files changed, 22 insertions, 26 deletions
diff --git a/app/assets/javascripts/pages/profiles/show/index.js b/app/assets/javascripts/pages/profiles/show/index.js index c9d3bbc8c39..0dd0d5336fc 100644 --- a/app/assets/javascripts/pages/profiles/show/index.js +++ b/app/assets/javascripts/pages/profiles/show/index.js @@ -56,34 +56,30 @@ document.addEventListener('DOMContentLoaded', () => { import(/* webpackChunkName: 'emoji' */ '~/emoji') .then(Emoji => { - Emoji.initEmojiMap() - .then(() => { - const emojiMenu = new EmojiMenu( - Emoji, - toggleEmojiMenuButtonSelector, - 'js-status-emoji-menu', - selectEmojiCallback, - ); - emojiMenu.bindEvents(); + const emojiMenu = new EmojiMenu( + Emoji, + toggleEmojiMenuButtonSelector, + 'js-status-emoji-menu', + selectEmojiCallback, + ); + emojiMenu.bindEvents(); - const defaultEmojiTag = Emoji.glEmojiTag(defaultStatusEmoji); - statusMessageField.addEventListener('input', () => { - const hasStatusMessage = statusMessageField.value.trim() !== ''; - const statusEmoji = findStatusEmoji(); - if (hasStatusMessage && statusEmoji) { - return; - } + const defaultEmojiTag = Emoji.glEmojiTag(defaultStatusEmoji); + statusMessageField.addEventListener('input', () => { + const hasStatusMessage = statusMessageField.value.trim() !== ''; + const statusEmoji = findStatusEmoji(); + if (hasStatusMessage && statusEmoji) { + return; + } - if (hasStatusMessage) { - toggleNoEmojiPlaceholder(false); - toggleEmojiMenuButton.innerHTML += defaultEmojiTag; - } else if (statusEmoji.dataset.name === defaultStatusEmoji) { - toggleNoEmojiPlaceholder(true); - removeStatusEmoji(); - } - }); - }) - .catch(() => createFlash('Failed to load emoji list.')); + if (hasStatusMessage) { + toggleNoEmojiPlaceholder(false); + toggleEmojiMenuButton.innerHTML += defaultEmojiTag; + } else if (statusEmoji.dataset.name === defaultStatusEmoji) { + toggleNoEmojiPlaceholder(true); + removeStatusEmoji(); + } + }); }) .catch(() => createFlash('Failed to load emoji list.')); }); |