Select all button works only on Nucleotide, not on Proteins

Hi all,

I tried adding a button to select/deselect all databases in SS. Following advice on SS Github, I implemented it in search.rb, but it works only on the first column (nucleotide) and not on the Protein column.

The code generating the databases list is the same in both column. Any advice?

I’m attaching my search.rb file. This is the portion of the code that affects the databases choice.

class="form-group databases-container">
<%# sort => same ordering of nucleotide and protein datbases %>
<% databases.keys.sort.each do |type| %>
class="<%= databases[(databases.keys - [type]).first] ? 'col-md-6' : 'col-md-12' %>">
class="panel panel-default">
<h4><%= type.capitalize %> databases</h4>
<input type="checkbox" id="checkAll" /> Select All Databases<br />
class="list-group databases <%= type %>">
<% databases[type].sort_by(&:title).each do |database| %>

<li class="list-group-item">
<input type="checkbox" name="databases[]" value="<>" data-type="<%=database.type%>" />
<%= database.title or %>
<% end %>

<!-- Select All -->
$('#checkAll').on('change', function(){
var others = $(this).parent().find('input[type="checkbox"]').not(this);
var value = !!this.checked;
others.prop('checked', value);

search.erb (16.2 KB)