Use this instead of @ in CoffeeScript

We're using `this` most of the time, and it's what's used in JavaScript.
This commit is contained in:
Javi Martín
2019-06-30 19:12:22 +02:00
parent aa458b8c87
commit 747767386a
4 changed files with 9 additions and 9 deletions

View File

@@ -12,9 +12,9 @@ App.TableSortable =
$("table.sortable th").click ->
table = $(this).parents("table").eq(0)
rows = table.find("tbody tr").toArray().sort(App.TableSortable.comparer($(this).index()))
@asc = !@asc
this.asc = !this.asc
if @asc
if this.asc
table.append rows
else
table.append rows.reverse()