title: jQuery Sortable - save order when new element dragged into list
body: <p>I have two sortable lists which hold work orders. The second list is a <code>Route</code> while the first is just a list of all the work orders that haven't been added to the <code>Route</code> list. The idea is that the user drags work orders into the <code>Route</code> in a specific order, rearranging the work orders to create a route that the employee will follow.</p>
  
  <p>My problem is with managing the position of new work orders dragged onto the <code>Route</code> list. Is there an easy way to deal with updating the positions of all of the list items (on the database side of things via ajax calls) as new items are being added? </p>
  
  <p><em>A bit more info for clarity...</em></p>
  
  <p>When the <code>Route</code> list is empty (no work orders added yet) it is simple - user drags new work order onto empty list, ajax call made to save the details (on the underlying records on the server) of both the <code>Route</code> object and the <code>Route Item</code> just added.</p>
  
  <p>When the user drags the second work order into the <code>Route</code> list I want to determine if the new work order will become first in the list, or second, then update all the information (server side) accordingly for all items in the list. Things get really complicated when I want to add a new work order to a <code>Route</code> that already has like 30 work orders.</p>
  
  <p>Is there a simple way to do this or is it just a matter of coding up a decent amount of jQuery and backend functions to manage this? I have been hunting around the net for solutions but can't find anything all that definitive. </p>