mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-07 20:40:26 +08:00
Fix checkbox in experiment reports
This commit is contained in:
parent
208e85e7e0
commit
9f7df0af76
2 changed files with 11 additions and 13 deletions
|
@ -67,7 +67,7 @@
|
||||||
projectCheckAlls.click(function() {
|
projectCheckAlls.click(function() {
|
||||||
var nextUl = $(this).closest("div.checkbox").next();
|
var nextUl = $(this).closest("div.checkbox").next();
|
||||||
if (nextUl.length && nextUl.is("ul.project-contents-list, \
|
if (nextUl.length && nextUl.is("ul.project-contents-list, \
|
||||||
ul-experiment-contents-list")) {
|
ul.experiment-contents-list")) {
|
||||||
nextUl.find("input:checkbox").prop("checked", this.checked);
|
nextUl.find("input:checkbox").prop("checked", this.checked);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<%= form.check_box :project, label: project.name, class: "project-all-cb" %>
|
<%= form.check_box :project, label: project.name, class: "project-all-cb" %>
|
||||||
<ul class="no-style project-contents-list">
|
<ul class="no-style project-contents-list">
|
||||||
<% project.experiments.is_archived(false).each do |experiment| %>
|
<% project.experiments.is_archived(false).each do |experiment| %>
|
||||||
|
<% next unless experiment.my_modules.is_archived(false).count > 0 %>
|
||||||
<li>
|
<li>
|
||||||
<%= form.check_box "experiment_#{experiment.id}", label: experiment.name, class: "project-all-cb" %>
|
<%= form.check_box "experiment_#{experiment.id}", label: experiment.name, class: "project-all-cb" %>
|
||||||
<ul class="no-style experiment-contents-list">
|
<ul class="no-style experiment-contents-list">
|
||||||
|
@ -21,22 +22,19 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<!-- Tasks without groups -->
|
<!-- Tasks without groups -->
|
||||||
<% modules_without_group = experiment.modules_without_group %>
|
<% modules_without_group = experiment.modules_without_group %>
|
||||||
<% if modules_without_group.present? and modules_without_group.count > 0 %>
|
<% if modules_without_group.present? and modules_without_group.count > 0 %>
|
||||||
<ul class="no-style experiment-contents-list">
|
<% modules_without_group.each do |my_module| %>
|
||||||
<% modules_without_group.each do |my_module| %>
|
<li>
|
||||||
<li>
|
<%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
|
||||||
<%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
|
</li>
|
||||||
</li>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue