Sha256: b13ae807f75a1c4bea57041d8762259f157c9ba8d22907e025c8491c5c1534e5
Contents?: true
Size: 845 Bytes
Versions: 43
Compression:
Stored size: 845 Bytes
Contents
$ -> $('[data-awesome-nested-set-item]').each -> $(@).draggable({ scope: $(@).attr('data-awesome-nested-set-item-scope'), revert: true }) $ -> $('[data-awesome-nested-set-item]').each -> redirect_target = $(@).attr('data-awesome-nested-set-item-on-drop-target') console.log(redirect_target) authenticity_token = $( 'meta[name="csrf-token"]' ).attr( 'content' ); $(@).droppable({ accept: '.awesome-nested-set-item', scope: $(@).attr('data-awesome-nested-set-item-scope'), activeClass: 'btn-success', drop: (event, ui) -> dropped_element = $(ui.draggable) dropped_element_to_param = dropped_element.attr('data-awesome-nested-set-item-uid') $.redirect(redirect_target,{ authenticity_token: authenticity_token, dropped_id: dropped_element_to_param }); })
Version data entries
43 entries across 43 versions & 2 rubygems