Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dynamic table in default view #1725

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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