Simplify finding rows for sortable tables

Including the table body is more intuitive than excluding the first row
and the table foot.
This commit is contained in:
Javi Martín
2019-06-29 15:34:46 +02:00
parent 936aa7af0f
commit c55a1a9faf

View File

@@ -11,7 +11,7 @@ App.TableSortable =
initialize: ->
$("table.sortable th").click ->
table = $(this).parents("table").eq(0)
rows = table.find("tr:gt(0)").not("tfoot tr").toArray().sort(App.TableSortable.comparer($(this).index()))
rows = table.find("tbody tr").toArray().sort(App.TableSortable.comparer($(this).index()))
@asc = !@asc
if @asc