From f9f1bf2f76d37a7c13b03fe41c6c2f722cec5145 Mon Sep 17 00:00:00 2001 From: HazelGrant Date: Thu, 12 Dec 2024 13:53:26 -0500 Subject: [PATCH 1/2] Fixes bug where icon shows up on 2nd path_selector on page --- .../app/javascript/path_selector/path_selector_data_table.js | 4 ++-- apps/dashboard/app/views/shared/_path_selector_table.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js b/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js index cc9d550c44..66aa1b2a04 100644 --- a/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js +++ b/apps/dashboard/app/javascript/path_selector/path_selector_data_table.js @@ -84,7 +84,7 @@ export class PathSelectorTable { async reloadTable(url) { try { $(this.tableWrapper()).hide(); - $('#loading-icon').show(); + $(this).closest('.loading-icon').show(); const response = await fetch(url, { headers: { 'Accept': 'application/json' }, cache: 'no-store' }); const data = await this.dataFromJsonResponse(response); $(`#${this.breadcrumbId}`).html(data.path_selector_breadcrumbs_html); @@ -104,7 +104,7 @@ export class PathSelectorTable { } resetTable() { - $('#loading-icon').hide(); + $(this).closest(".loading-icon").hide(); $(this.tableWrapper()).show(); $('#forbidden-warning').addClass('d-none'); } diff --git a/apps/dashboard/app/views/shared/_path_selector_table.html.erb b/apps/dashboard/app/views/shared/_path_selector_table.html.erb index 127159f2c8..ba9f13355e 100644 --- a/apps/dashboard/app/views/shared/_path_selector_table.html.erb +++ b/apps/dashboard/app/views/shared/_path_selector_table.html.erb @@ -45,7 +45,7 @@
-
+
Loading...
From bd2e89002964d27b9f3a30d01e8e7059fc10a193 Mon Sep 17 00:00:00 2001 From: HazelGrant Date: Thu, 12 Dec 2024 14:01:16 -0500 Subject: [PATCH 2/2] Fixes HTML --- apps/dashboard/app/views/shared/_path_selector_table.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dashboard/app/views/shared/_path_selector_table.html.erb b/apps/dashboard/app/views/shared/_path_selector_table.html.erb index ba9f13355e..7a91c3098f 100644 --- a/apps/dashboard/app/views/shared/_path_selector_table.html.erb +++ b/apps/dashboard/app/views/shared/_path_selector_table.html.erb @@ -45,7 +45,7 @@
-
+
Loading...