mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +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() {
|
||||
var nextUl = $(this).closest("div.checkbox").next();
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<%= form.check_box :project, label: project.name, class: "project-all-cb" %>
|
||||
<ul class="no-style project-contents-list">
|
||||
<% project.experiments.is_archived(false).each do |experiment| %>
|
||||
<% next unless experiment.my_modules.is_archived(false).count > 0 %>
|
||||
<li>
|
||||
<%= form.check_box "experiment_#{experiment.id}", label: experiment.name, class: "project-all-cb" %>
|
||||
<ul class="no-style experiment-contents-list">
|
||||
|
@ -21,22 +22,19 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<!-- Tasks without groups -->
|
||||
<% modules_without_group = experiment.modules_without_group %>
|
||||
<% 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| %>
|
||||
<li>
|
||||
<%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
|
||||
</li>
|
||||
<!-- Tasks without groups -->
|
||||
<% modules_without_group = experiment.modules_without_group %>
|
||||
<% if modules_without_group.present? and modules_without_group.count > 0 %>
|
||||
<% modules_without_group.each do |my_module| %>
|
||||
<li>
|
||||
<%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
<% else %>
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue