1 function parse_patch_id(id_str)
5 i = id_str.indexOf(':');
9 return id_str.substring(i + 1);
12 function bundle_handle_drop(table, row)
14 var relative, relation, current;
15 var relative_id, current_id;
18 relative = $(current).prev();
21 /* if we have no previous row, position ourselves before the next
23 if (!relative.length) {
24 relative = current.next();
31 current_id = parse_patch_id(current.attr('id'));
32 relative_id = parse_patch_id(relative.attr('id'));
34 alert("put patch " + current_id + " " + relation + " " + relative_id);
37 $(document).ready(function() {
38 $("#patchlist").tableDnD({
39 onDrop: bundle_handle_drop