Skip to content

Commit

Permalink
Merge pull request seek4science#1725 from ELIXIR-Belgium/fix_dynamic_…
Browse files Browse the repository at this point in the history
…table_default_view

Fix dynamic table in default view
  • Loading branch information
kdp-cloud authored Jan 24, 2024
2 parents 0ea9bd4 + 1cc9b45 commit 3e0bc84
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/single_page/dynamic_table.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions app/views/isa_assays/_assay_design.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
</p>
<% end %>
<script>
window.instanceName = "<%= Seek::Config.instance_name %>";
async function loadDynamicTableFromDefaultView(element) {
await loadItemDetails(`/assays/${id}`, { view: "default" });
}
Expand Down
1 change: 1 addition & 0 deletions app/views/isa_studies/_study_design.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<% end %>

<script>
window.instanceName = "<%= Seek::Config.instance_name %>";
async function loadDynamicTableFromDefaultView(element) {
await loadItemDetails(`/studies/${id}`, { view: "default" });
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/single_pages/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

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

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

0 comments on commit 3e0bc84

Please sign in to comment.