Skip to content

Commit 3e0bc84

Browse files
authored
Merge pull request #1725 from ELIXIR-Belgium/fix_dynamic_table_default_view
Fix dynamic table in default view
2 parents 0ea9bd4 + 1cc9b45 commit 3e0bc84

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

app/assets/javascripts/single_page/dynamic_table.js.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const handleSelect = (e) => {
8383
if (cellData == "#HIDDEN") $j(td).addClass("disabled");
8484
};
8585
// Changes the id header to an instance id
86-
if (c.title == "id") c.title = instanceName + " id";
86+
if (c.title == "id") c.title = window.instanceName + " id";
8787
});
8888
// Retrieve the column index of the multi-input cells (select2 items)
8989
// if column has a multi-input cell, it adds the index to the t array (=accumulator)

app/views/isa_assays/_assay_design.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
</p>
4343
<% end %>
4444
<script>
45+
window.instanceName = "<%= Seek::Config.instance_name %>";
4546
async function loadDynamicTableFromDefaultView(element) {
4647
await loadItemDetails(`/assays/${id}`, { view: "default" });
4748
}

app/views/isa_studies/_study_design.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<% end %>
5050

5151
<script>
52+
window.instanceName = "<%= Seek::Config.instance_name %>";
5253
async function loadDynamicTableFromDefaultView(element) {
5354
await loadItemDetails(`/studies/${id}`, { view: "default" });
5455
}

app/views/single_pages/show.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
<script type="text/javascript">
6969
var selectedItem = {type:"",id:""}, pid, uid, projectDefaultPolicy, dynamicTableDataPath
70-
const instanceName = "<%= Seek::Config.instance_name %>";
70+
window.instanceName = "<%= Seek::Config.instance_name %>";
7171

7272
$j(document).ready(function() {
7373
$j("#content .container-fluid").removeClass("container-fluid").addClass("container-fluid-single-page")

0 commit comments

Comments
 (0)