From 6c7a88475e9dde651f7396c61cfe9da2dfdf5868 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Wed, 29 Jan 2020 09:36:21 +0100 Subject: [PATCH] Fix icon selection --- .../columns_initializers/status_column_type.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/repository_columns/columns_initializers/status_column_type.js b/app/assets/javascripts/repository_columns/columns_initializers/status_column_type.js index 45e71d66d..a26eecaa6 100644 --- a/app/assets/javascripts/repository_columns/columns_initializers/status_column_type.js +++ b/app/assets/javascripts/repository_columns/columns_initializers/status_column_type.js @@ -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) {