Sha256: e70fcbfac7549b69fa7c3f69116c153043e3c889260c15b89833170648084cac
Contents?: true
Size: 537 Bytes
Versions: 8
Compression:
Stored size: 537 Bytes
Contents
$(document).ready(function() { var reportID = $("#report_id").text() $("#photo_list").sortable({ handle : '.handle', items : 'div.sortable', update : function (event, ui) { var orderedElements = new Array(); ui.item.parent().children('.sortable').each(function(index, value){ orderedElements.push(value.id.match(/[\d]*$/)) }); $.post("/reports/" + reportID + "/photos/sort", {'photo_list[]': orderedElements, authenticity_token: window.rails_authenticity_token}); } }); });
Version data entries
8 entries across 8 versions & 1 rubygems