Skip to content

Commit c572b43

Browse files
committed
Add:全選択の追加
1 parent 24b37b5 commit c572b43

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/assets/javascripts/videos.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$(function() {
2+
$('#check_all').on('change', function() {
3+
$('input[name^=ids]').prop('checked', this.checked);
4+
});
5+
});

app/views/videos/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<table class="table table-striped table-bordered table-hover">
1616
<thead>
1717
<tr>
18-
<th width="10"><%= check_box_tag 'check_all', :class => "checkbox" %></th>
18+
<th width="10"><%= check_box_tag 'check_all' %></th>
1919
<th>動画名</th>
2020
<th>総数</th>
2121
<th>解決</th>
@@ -39,4 +39,4 @@
3939
</table>
4040
</div>
4141
<% end %>
42-
<%= paginate(@videos) %>
42+
<%= paginate(@videos) %>

0 commit comments

Comments
 (0)