Hey folks, On the Drag and Drop demo page in the Sortable Lists Demo section: http://script.aculo.us/drag-and-drop If you drag all of the items from the first list into the second list, it appears that you cannot drag a list item back into the first (now empty) list. Is there a way to allow a Sortable that is empty of draggable items to accept dropped items? Danilo
Currently it''s not easy to do. You''d need to add a single element on top of all other elements in the sortable container, being only a droppable. This is something I want in one of the next releases. Thomas Am 07.07.2005 um 07:28 schrieb danilocelic:> Hey folks, > > On the Drag and Drop demo page in the Sortable Lists Demo section: > http://script.aculo.us/drag-and-drop > > If you drag all of the items from the first list into the second > list, it appears that you cannot drag a list item back into the > first (now empty) list. > > Is there a way to allow a Sortable that is empty of draggable items > to accept dropped items? > > > > Danilo > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Thomas, Do you have a code sample of this in action? My attempts locally seem to have come up short. Here is a snippet of what I''m using. I''ve tried adding containment and accept options to the Droppable, but no go for me. I''ve tried it with a parent DIV with nested DIVs instead of LIs. <table><tr><td> <ul id="listOne"> <li id="oneSubOne" class="interiorLI">one one</li> <li id="oneSubTwo" class="interiorLI">one two</li> <li id="oneSubThree" class="interiorLI">onw three</li> </ul> </td><td> <ol id="listTwo"> <li id="placeHolderLI" >placeholder</li> <li id="twoSubOne" class="interiorLI">two one</li> <li id="twoSubTwo" class="interiorLI">two two</li> <li id="twoSubTree" class="interiorLI">two three</li> </ol> </td></tr></table> <script type="text/javascript"> Sortable.create(''listOne'', {constraint:'''', only:''interiorLI'', containment:["listOne","listTwo"]} ); Sortable.create(''listTwo'',{ constraint:'''',only:''interiorLI'', containment: [''listOne'', ''listTwo'']} ); Droppables.add(''placeHolderLI''); </script> In case it matters, Im using the latest 1.0 files right now,a dn teh 1.3 of Prototype.js file. Danilo Thomas Fuchs wrote:> Currently it''s not easy to do. You''d need to add a single element on > top of all other elements in the sortable container, being only a > droppable. This is something I want in one of the next releases.
Possibly Parallel Threads
- hoverclass doesn''t seem to be set from Sortable.create
- vpnc versus Shorewall problem
- Plotting continuous line types w/large datasets
- DO NOT REPLY [Bug 4195] New: "--list-only" option has an off-by-one error and misses out the last file of the list
- postscript help