I'd like the ability to provide 'accept: someCssClass' to a Sortable.create(...) call and have the resultant sortable only accept elements of the specified CSS class.
I've made some simple tweaks to dragdrop.js 1.5RC5 (essentially adding "accept" as a pass-thru from Sortable.create(...) to the contained droppables). The result works for the simple case, but this case does not work:
- There are two lists (List A and B)
- List A contains elements with the CSS class "lower" and "capital"
- List B will only accept "capital" elements.
- Drag a "capital" element from A to B, which is correctly accepted
- Drag a "lower" element from A to B, and we see trouble. The droppables around the original List B elements won't accept it, but the droppables surrounding the element dropped in step 4 will still accept it.
The droppables on the originally-dropped element obviously don't get modified with their new 'accept' option. If there is an acceptable way to do this outside of script.aculo.us, please let me know.