Sha256: 42e2aebb592265af946891ed2396c3d622e10fa7f23fd465fd992364e011391a
Contents?: true
Size: 639 Bytes
Versions: 20
Compression:
Stored size: 639 Bytes
Contents
$(document).on("turbolinks:load",function () { $('.sortable_tree').nestedSortable({ handle: 'div', items: 'li', cursor: 'pointer', scroll: true, toleranceElement: '> div', maxLevels: 1 }); $("#save_order").click(function(){ var array_positions = $('#sort_tree').nestedSortable("toHierarchy"); var url = $('#save_order').data("url-update"); $.ajax({ url: url, contentType: "application/json;charset=utf-8", data: JSON.stringify({ordered_data: array_positions}), method: "PUT" }) }); });
Version data entries
20 entries across 20 versions & 1 rubygems