Merge pull request #3773 from aignatov-bio/ai-sci-6407-fix-status-column

Fix status column emojis [SCI-6407]
This commit is contained in:
Alex Kriuchykhin 2022-01-11 13:34:17 +01:00 committed by GitHub
commit 6132d8a8ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View file

@ -54,7 +54,7 @@ var RepositoryStatusColumnType = (function() {
var picker = new EmojiButton({ rootElement: document.getElementById('manage-repository-column') });
var iconElement = this;
picker.on('emoji', emoji => {
$(iconElement).attr('emoji', emoji).html(twemoji.parse(emoji));
$(iconElement).attr('emoji', emoji.emoji).html(twemoji.parse(emoji.emoji));
validateForm();
});
@ -63,7 +63,9 @@ var RepositoryStatusColumnType = (function() {
} else {
picker.showPicker(iconElement);
}
twemoji.parse($('.emoji-picker').last().find('.emoji-picker__tab-body')[1]);
$.each($('.emoji-picker__emojis').last().find('.emoji-picker__container'), function(i, container) {
twemoji.parse(container);
});
})
.on('click', '.emoji-picker__tab-body.active .emoji-picker__emoji', function() {
if ($('.emoji-picker__variant-popup').length) {
@ -73,7 +75,7 @@ var RepositoryStatusColumnType = (function() {
.on('click', '.emoji-picker__tab', function() {
$.each($('.emoji-picker__tab'), (i, tab) => {
if ($(tab).hasClass('active')) {
twemoji.parse($('.emoji-picker__tab-body')[i]);
twemoji.parse($('.emoji-picker__container')[i]);
}
});
});

View file

@ -168,7 +168,7 @@
}
.emoji-picker__emojis {
height: 14rem;
height: 28rem;
}
.emoji-picker__variant-popup {

View file

@ -1,4 +1,7 @@
global.twemoji = require('twemoji').default;
global.twemoji.base = '/images/twemoji/';
global.twemoji.size = '24x24';
global.EmojiButton = require('@joeattardi/emoji-button/dist/index');
import { EmojiButton } from '@joeattardi/emoji-button';
global.EmojiButton = EmojiButton;