Move logic for toggling by column into SortOptions

This commit is contained in:
Kristina Lim
2018-07-20 09:25:55 +08:00
committed by Maikel Linke
parent 55d0b1dfc5
commit 5179f7fd63
3 changed files with 16 additions and 12 deletions

View File

@@ -2,3 +2,7 @@ angular.module("admin.indexUtils").factory 'SortOptions', ->
new class SortOptions
predicate: ""
reverse: true
toggle: (predicate) ->
@predicate = predicate
@reverse = !@reverse