Lindsey Simon
2005-Dec-28 17:39 UTC
Sortable - can we make one or more elements in a list sticky?
In a sortable list, is there a way to say, pass a className whereby some of the elements in the sortable element would not become draggables/droppables? If not, it seems like it could be implemented similarly to the handle option.. Any interest? Also - I submitted a patch that adds the option "delay" so that draggables in a Sortable won''t truly become activated until after the mouse has been down on the draggable for some length of time. I''d love to get some feedback/testing if anyone is interested in that too - my patch included a functional test. I needed this functionality because I''m implementing a DataGrid and I''ve turned the <th>''s into a Sortable with horizontal constraint so that one can drag columns around in a table. Yeeha! It only works because I''ve manipulated the display property of the th''s, but no matter - it does work. If anyone is interested in this stuff on this list, lemme know too, Regards, -- Lindsey Simon lsimon-kAMMLXQ8Af9Wk0Htik3J/w@public.gmane.org Key fingerprint = C6A9 B9D9 677E A631 3E7F 43BF 5E2F 77F1 A33C B117 Public Key: http://www.commoner.com/pubkey.asc
Jerod Venema
2005-Dec-28 18:01 UTC
Re: Sortable - can we make one or more elements in a list sticky?
Lindsey, Do you have an example of the "delay" functionality? I''d like to take a look at that. -Jerod On 12/28/05, Lindsey Simon <lsimon-kAMMLXQ8Af9Wk0Htik3J/w@public.gmane.org> wrote:> > > In a sortable list, is there a way to say, pass a className whereby some > of the elements in the sortable element would not become > draggables/droppables? If not, it seems like it could be implemented > similarly to the handle option.. Any interest? > > Also - I submitted a patch that adds the option "delay" so that draggables > in a Sortable won''t truly become activated until after the mouse has > been down on the draggable for some length of time. I''d love to get some > feedback/testing if anyone is interested in that too - my patch included > a functional test. I needed this functionality because I''m implementing > a DataGrid and I''ve turned the <th>''s into a Sortable with horizontal > constraint so that one can drag columns around in a table. Yeeha! It > only works because I''ve manipulated the display property of the th''s, > but no matter - it does work. If anyone is interested in this stuff on > this list, lemme know too, > > Regards, > > -- > > Lindsey Simon > lsimon-kAMMLXQ8Af9Wk0Htik3J/w@public.gmane.org > Key fingerprint = C6A9 B9D9 677E A631 3E7F 43BF 5E2F 77F1 A33C B117 > Public Key: http://www.commoner.com/pubkey.asc > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Lindsey Simon
2005-Dec-28 18:14 UTC
Re: Sortable - can we make one or more elements in a list sticky?
Here''s a patch against a svn up of a moment ago (rev 3358) ;) Jerod Venema in message Re: [Rails-spinoffs] Sortable - can we make one or more elements in a list sticky? (Wed, 12/28 13:01):> Lindsey, > > Do you have an example of the "delay" functionality? I''d like to take a look > at that. > > -Jerod > > On 12/28/05, Lindsey Simon <lsimon-kAMMLXQ8Af9Wk0Htik3J/w@public.gmane.org> wrote: > > > > > > In a sortable list, is there a way to say, pass a className whereby some > > of the elements in the sortable element would not become > > draggables/droppables? If not, it seems like it could be implemented > > similarly to the handle option.. Any interest? > > > > Also - I submitted a patch that adds the option "delay" so that draggables > > in a Sortable won''t truly become activated until after the mouse has > > been down on the draggable for some length of time. I''d love to get some > > feedback/testing if anyone is interested in that too - my patch included > > a functional test. I needed this functionality because I''m implementing > > a DataGrid and I''ve turned the <th>''s into a Sortable with horizontal > > constraint so that one can drag columns around in a table. Yeeha! It > > only works because I''ve manipulated the display property of the th''s, > > but no matter - it does work. If anyone is interested in this stuff on > > this list, lemme know too, > > > > Regards, > > > > -- > > > > Lindsey Simon > > lsimon-kAMMLXQ8Af9Wk0Htik3J/w@public.gmane.org > > Key fingerprint = C6A9 B9D9 677E A631 3E7F 43BF 5E2F 77F1 A33C B117 > > Public Key: http://www.commoner.com/pubkey.asc > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >> _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs-- Lindsey Simon lsimon-kAMMLXQ8Af9Wk0Htik3J/w@public.gmane.org Key fingerprint = C6A9 B9D9 677E A631 3E7F 43BF 5E2F 77F1 A33C B117 Public Key: http://www.commoner.com/pubkey.asc _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Douglas Forrest
2005-Dec-28 23:03 UTC
Re: Sortable - can we make one or more elements in a list sticky?
The "only" option in Sortable.create "Further restricts the selection of child elements to only encompass elements with the given CSS class (or, if you provide an array of strings, on any of the classes)". So just include all the class elements except those you want to be sticky in "only". Works great! - Doug Forrest Lindsey Simon wrote:>In a sortable list, is there a way to say, pass a className whereby some >of the elements in the sortable element would not become >draggables/droppables? If not, it seems like it could be implemented >similarly to the handle option.. Any interest? > >Also - I submitted a patch that adds the option "delay" so that draggables >in a Sortable won''t truly become activated until after the mouse has >been down on the draggable for some length of time. I''d love to get some >feedback/testing if anyone is interested in that too - my patch included >a functional test. I needed this functionality because I''m implementing >a DataGrid and I''ve turned the <th>''s into a Sortable with horizontal >constraint so that one can drag columns around in a table. Yeeha! It >only works because I''ve manipulated the display property of the th''s, >but no matter - it does work. If anyone is interested in this stuff on >this list, lemme know too, > >Regards, > > >