+ form.get(0).submit();
+ } else {
+
+ /* store the first order value */
+ start_order = row_to_patch_id(rows[0]);
+ $("input[name='order_start']").attr("value", start_order);
+
+ /* update buttons */
+ node.setAttribute("value", "Save order");
+ $("#reorder\\-cancel").css("display", "inline");
+
+ /* show help text */
+ $("#reorderhelp").text('Drag & drop rows to reorder');
+
+ /* enable drag & drop on the patches list */
+ $("#patchlist").tableDnD({
+ onDragClass: 'dragging',
+ onDragStart: function() { dragging = true; },
+ onDrop: function() { dragging = false; }
+ });
+
+ /* replace zebra striping with hover */
+ $("#patchlist tbody tr").css("background", "inherit");
+ $("#patchlist tbody tr").hover(drag_hover_in, drag_hover_out);