Prototype/scriptaculous Issue With Sortable.create()
I’ve been doing some custom sorting within FarCry using the prototype/scriptaculous libraries as they already exist in the FarCry framework by default.
I was having trouble getting the Sortable.create() to work properly and the main docs site for scriptaculous seems severely lacking in examples. Basically the “sorting” action was happening fine but no event was being fired “onUpdate”. No exception was being thrown, just that nothing was happening after the drag/drop.
The solution came from google (where else?) on the rubyonrails groups thanks to a fellow named Chris.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Wait, read that again. Are you serious?
Yep…you have to split your “id” value with a string, then an underscore followed by an integer. This is truly the dumbest thing I’ve found in a while. Hall of famer for sure.
Just posting here to help anyone else who spends more time than necessary getting this (simple) task working.