|
Passing "accept" option through a Sortable: msg#00096lang.ruby.rails.spinoffs
Hi All, I'm attempting to tweak Scriptaculous 1.5R4 to provide the ability to pass the "accept" option through the Sortable.create(...) call to the enclosed Droppable(s). I'm far from a JavaScript expert (Scriptaculous & AJAX have convinced me to finally start learning), so I'm kinda fumbling in the dark here. Thus far I've made two minor changes to 'dragdrop.js': o Added 'accept: options.accept' to 'options_for_droppable' (line 395) o Added 'accept: options.accept' to the metadata for handling dropOnEmpty (line 409) Things work OK, except for the following case: 1. There are two lists 2. List #1 contains one items with CSS class "capitalized" and another with CSS class "lower" 3. List #2 will only accept items with CSS class "capitalized". 4. Drag the "capitalized" item from #1 to #2, which (correctly) gets accepted. 5. Try to drag the "lower" item from #1 to #2, and we see the trouble. The droppables surrounding the items that were originally in list #2 won't accept it, but the droppables surrounding the item that was previously in list #1 **will** accept it. So, it seems like I'm almost there, but not quite. Any suggestions as to what to do to make dropped items get the correct 'accept' option? Attached a basic HTML page I've been using to play around with it. TIA, Peter
List #1
ONE
two
THREE
List #2
A
B
C
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@xxxxxxxxxxxxxxxx http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Drag & Scroll: 00096, Martin Scheffler |
|---|---|
| Next by Date: | Looking to develop for scriptaculous: 00096, Casey O'Neill |
| Previous by Thread: | afterFinish option not working as expectedi: 00096, Andrew Kaspick |
| Next by Thread: | Looking to develop for scriptaculous: 00096, Casey O'Neill |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |