Sha256: 7538e92ee297ea558f16f7107e9336fbc097aa91aee578cf47fc463d4494dd22
Contents?: true
Size: 689 Bytes
Versions: 12
Compression:
Stored size: 689 Bytes
Contents
ready = -> $('tbody#sortable').sortable update: (event, ui) -> position = 1 $(@).children('tr').each -> if $(@).data('id') == ui.item.data('id') $row = $(@) $.ajax( url: $row.data('url') data: position: position method: 'put', success: -> # flash the updated $row $row.addClass('success') setTimeout ( -> $row.removeClass('success') ), 500 ) return true else position++ $('tbody#sortable').disableSelection $(document).ready(ready) $(document).on('page:load', ready)
Version data entries
12 entries across 12 versions & 1 rubygems