From 2dc82c9ed93a03d0bc070085379698cd5e8e8787 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Fri, 18 Aug 2023 16:26:53 +0200 Subject: [PATCH] Show table header in folder when creating the first project [SCI-9019] --- app/assets/javascripts/projects/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index e9e194f0b..34df7ad5f 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -416,12 +416,12 @@ var ProjectsIndex = (function() { viewContainer.removeClass('no-results no-data'); viewContainer.find('.card, .projects-group, .no-results-container, .no-data-container').remove(); - if (viewContainer.find('.list').length) { + viewContainer.append(data.cards_html); + + if (viewContainer.hasClass('list')) { viewContainer.find('.table-header').show(); } - viewContainer.append(data.cards_html); - if (viewContainer.find('.no-results-container').length) { viewContainer.addClass('no-results'); }