mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Fix icon selection
This commit is contained in:
parent
7c4d842b97
commit
6c7a88475e
1 changed files with 3 additions and 2 deletions
|
@ -24,12 +24,12 @@ var RepositoryStatusColumnType = (function() {
|
|||
$.each($statusRows, (index, statusRow) => {
|
||||
var $row = $(statusRow);
|
||||
var $statusField = $row.find('.status-item-field');
|
||||
var iconPlaceholder = $row.find(iconId).attr('emoji');
|
||||
var icon = $row.find(iconId).attr('emoji');
|
||||
var stringLength = $statusField.val().length;
|
||||
|
||||
if (stringLength < GLOBAL_CONSTANTS.NAME_MIN_LENGTH
|
||||
|| stringLength > GLOBAL_CONSTANTS.NAME_MAX_LENGTH
|
||||
|| !iconPlaceholder) {
|
||||
|| !icon) {
|
||||
$row.addClass('error').attr('data-error-text', I18n.t('libraries.manange_modal_column.status_type.errors.icon_and_name_error'));
|
||||
} else {
|
||||
$row.removeClass('error');
|
||||
|
@ -55,6 +55,7 @@ var RepositoryStatusColumnType = (function() {
|
|||
var iconElement = this;
|
||||
picker.on('emoji', emoji => {
|
||||
$(iconElement).attr('emoji', emoji).html(twemoji.parse(emoji));
|
||||
validateForm();
|
||||
});
|
||||
|
||||
if (picker.pickerVisible) {
|
||||
|
|
Loading…
Reference in a new issue