Skip to content

Commit

Permalink
Make table orderable
Browse files Browse the repository at this point in the history
  • Loading branch information
nioupola committed Aug 29, 2022
1 parent 6a6f0b0 commit 3eb0996
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/assets/javascripts/admin.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ $ ->
notices.hide('fast')
, 5000

$('.data-orderable-list').each ->
new Sortable(this,
group: 'omega'
handle: '.drag-handle'
sortabledata = document.getElementsByClassName('data-orderable-list')[0]
sortable = new Sortable(sortabledata,
onUpdate: ->
orderedIds = $.map($(this.el).find('.data-orderable-id'), (elem) ->
$(elem).data 'orderable-id'
Expand Down

0 comments on commit 3eb0996

Please sign in to comment.