From 1cc9b45403597198fc1c7df9b44f3b0d68c76ab5 Mon Sep 17 00:00:00 2001 From: Kevin De Pelseneer Date: Fri, 19 Jan 2024 10:19:34 +0100 Subject: [PATCH] Move instanceName to the window-level and declare it in both assay_design and study_design --- app/assets/javascripts/single_page/dynamic_table.js.erb | 2 +- app/views/isa_assays/_assay_design.html.erb | 1 + app/views/isa_studies/_study_design.html.erb | 1 + app/views/single_pages/show.html.erb | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/single_page/dynamic_table.js.erb b/app/assets/javascripts/single_page/dynamic_table.js.erb index c344d5e762..e3032c5cfe 100644 --- a/app/assets/javascripts/single_page/dynamic_table.js.erb +++ b/app/assets/javascripts/single_page/dynamic_table.js.erb @@ -83,7 +83,7 @@ const handleSelect = (e) => { if (cellData == "#HIDDEN") $j(td).addClass("disabled"); }; // Changes the id header to an instance id - if (c.title == "id") c.title = instanceName + " id"; + if (c.title == "id") c.title = window.instanceName + " id"; }); // Retrieve the column index of the multi-input cells (select2 items) // if column has a multi-input cell, it adds the index to the t array (=accumulator) diff --git a/app/views/isa_assays/_assay_design.html.erb b/app/views/isa_assays/_assay_design.html.erb index 98415832d7..9240363691 100644 --- a/app/views/isa_assays/_assay_design.html.erb +++ b/app/views/isa_assays/_assay_design.html.erb @@ -42,6 +42,7 @@

<% end %>