Sha256: 962d53e09e86e6a38ada63987f27a7294d95de01bcfe7ee8b38a0e65145ed6e9
Contents?: true
Size: 606 Bytes
Versions: 83
Compression:
Stored size: 606 Bytes
Contents
class Tenon.features.tenonContent.Sortable constructor: ($container) -> $container.sortable update: @_reordered handle: '.drag-anchor' placeholder: 'sortable-placeholder tn-tc-row' start: (e, ui) -> ui.placeholder.height(ui.item.height()) $container.on 'cocoon:after-insert', (e) => @_updateListOrders($(e.currentTarget)) _reordered: (event, ui) => $list = $(ui.item).closest('.tenon-content') @_updateListOrders($list) _updateListOrders: ($list) => $.each $list.find('.tn-tc-row'), (i, row) -> $(row).find('input[name*=list_order]').val(i)
Version data entries
83 entries across 83 versions & 1 rubygems