From 557b42293557199f18eb23bc091f68f8c891d6f1 Mon Sep 17 00:00:00 2001 From: artoscinote <85488244+artoscinote@users.noreply.github.com> Date: Thu, 18 May 2023 09:46:28 +0200 Subject: [PATCH] Revert "Revamp of (top) toolbar - Reports [SCI-8370]" --- .../javascripts/reports/reports_datatable.js | 19 ---------- app/assets/stylesheets/report_index.scss | 38 +------------------ app/views/reports/_index_toolbar.html.erb | 6 +-- 3 files changed, 4 insertions(+), 59 deletions(-) diff --git a/app/assets/javascripts/reports/reports_datatable.js b/app/assets/javascripts/reports/reports_datatable.js index b26e1f8ce..e7cd37475 100644 --- a/app/assets/javascripts/reports/reports_datatable.js +++ b/app/assets/javascripts/reports/reports_datatable.js @@ -359,25 +359,6 @@ generateReportRequest('generate-pdf-path', reportId); }); - // Search container logic - const $searchIcon = $('.search-icon'); - const $searchInput = $('.report-search'); - - $searchIcon.click(function() { - $searchIcon.addClass('hidden'); - $searchInput.removeClass('hidden').addClass('search-input-field'); - }); - - $(document).click(function(event) { - const isClickInside = $searchInput.is(event.target) || $searchIcon.is(event.target); - if (!isClickInside) { - if ($searchInput.val().trim() === '') { - $searchIcon.removeClass('hidden'); - $searchInput.addClass('hidden').removeClass('search-input-field'); - } - } - }); - $('#show_report_preview').click(); initDatatable(); diff --git a/app/assets/stylesheets/report_index.scss b/app/assets/stylesheets/report_index.scss index 3debcbb4d..6403e4a5a 100644 --- a/app/assets/stylesheets/report_index.scss +++ b/app/assets/stylesheets/report_index.scss @@ -19,48 +19,12 @@ } } - .toolbar-row { - display: flex; - justify-content: space-between; - } - .search-report-container { + display: inline-block; float: right; margin-right: 2em; width: 200px; } - - .sci-input-container { - display: flex; - align-items: center; - position: relative; - width: 200px; - } - - .flex-row-reverse { - flex-direction: row-reverse; - } - - .search-icon { - cursor: pointer; - } - - .report-search { - position: absolute; - top: 0; - left: auto; - right: 100%; - width: 100%; - } - - .hidden { - display: none; - } - - .search-input-field { - position: relative; - left: 5px; - } } .reports-datatable { diff --git a/app/views/reports/_index_toolbar.html.erb b/app/views/reports/_index_toolbar.html.erb index e576261ed..c05563ebb 100644 --- a/app/views/reports/_index_toolbar.html.erb +++ b/app/views/reports/_index_toolbar.html.erb @@ -5,8 +5,8 @@ <% end %> -
- - "> +
+ "> +
<% end %>