From 6c5be802ba0b54b4508c4945b890f6f93bfb04e4 Mon Sep 17 00:00:00 2001 From: Urban Rotnik Date: Fri, 24 Apr 2020 08:45:34 +0200 Subject: [PATCH] Fix items count validation --- .../columns_initializers/list_column_type.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/repository_columns/columns_initializers/list_column_type.js b/app/assets/javascripts/repository_columns/columns_initializers/list_column_type.js index 7142e02a5..17f8dc0a4 100644 --- a/app/assets/javascripts/repository_columns/columns_initializers/list_column_type.js +++ b/app/assets/javascripts/repository_columns/columns_initializers/list_column_type.js @@ -91,7 +91,7 @@ var RepositoryListColumnType = (function() { $counterContainer.find('.items-count').html(number).attr('data-count', number); - if (number >= GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN) { + if (number > GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN) { $counterContainer.addClass('error-to-many-items'); $textarea.addClass('too-many-items'); $btn.addClass('disabled'); @@ -162,7 +162,7 @@ var RepositoryListColumnType = (function() { checkValidation: () => { var $manageModal = $(manageModal); var count = $manageModal.find('.items-count').attr('data-count'); - return count < GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN; + return count <= GLOBAL_CONSTANTS.REPOSITORY_LIST_ITEMS_PER_COLUMN; }, loadParams: () => { var repositoryColumnParams = {};