Has anyone done any work on a "Resizeable" class they''d be willing to share? I''m looking to do some stuff that''ll need resizable divs, but I didn''t want to re-invent the wheel if I can avoid it. -Jerod _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Jerod Venema wrote:>Has anyone done any work on a "Resizeable" class they''d be willing to share? >I''m looking to do some stuff that''ll need resizable divs, but I didn''t want >to re-invent the wheel if I can avoid it. > >I have done one but have not released it back as a patch. In my example I have a resizeable element that you can resize by clicking and dragging it to resize (top left corner frozen) and that it will take external input. Specifically I linked two sliders and the resizeable div together so that the two sliders represented the x and y values of the div''s width and height and would stay in sync if you manually resized the div. I never released it as I felt it may have been too customized and I''m not running 1.5.1 either. But you''re welcome to take it as something to start with. If others feel that it may be something good to add to the scriptaculous library, I''d be happy to ''clean it up'', test it with 1.5.1 and send Thomas a patch. Cheers, Marty
Hello Marty, I''d be interested as well - would be nice and helpful, if you could make it available. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Marty Haught Sent: Wednesday, January 04, 2006 4:39 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Resizeable Jerod Venema wrote:>Has anyone done any work on a "Resizeable" class they''d be willing toshare?>I''m looking to do some stuff that''ll need resizable divs, but I didn''t want >to re-invent the wheel if I can avoid it. > >I have done one but have not released it back as a patch. In my example I have a resizeable element that you can resize by clicking and dragging it to resize (top left corner frozen) and that it will take external input. Specifically I linked two sliders and the resizeable div together so that the two sliders represented the x and y values of the div''s width and height and would stay in sync if you manually resized the div. I never released it as I felt it may have been too customized and I''m not running 1.5.1 either. But you''re welcome to take it as something to start with. If others feel that it may be something good to add to the scriptaculous library, I''d be happy to ''clean it up'', test it with 1.5.1 and send Thomas a patch. Cheers, Marty _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Marco M. Jaeger wrote:>Hello Marty, > >I''d be interested as well - would be nice and helpful, if you could make it >available. > >Okay, I''ll see if I can get it ready to patch this week. If anyone needs it sooner than a few days, please email me privately. Cheers, Marty
Check out mine here: http://blog.craz8.com/articles/2005/12/01/make-your-divs-resizeable ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jerod Venema Sent: Wednesday, January 04, 2006 7:28 AM To: Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Resizeable Has anyone done any work on a "Resizeable" class they''d be willing to share? I''m looking to do some stuff that''ll need resizable divs, but I didn''t want to re-invent the wheel if I can avoid it. -Jerod _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Couple of weird things on your demo page... 1) The div that says it has no resize on top can still be resized from the top. 2) For all the divs, if you grab the top and resive all the way to the bottom and keep going, it moves the whole div downwards (the downward movement seems to be capped at a certain number of pixels though). That behavior is not repeated when resizing in other directions. Just some FYIs... -Ryan Gahl ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes Sent: Wednesday, January 04, 2006 3:03 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Resizeable Check out mine here: http://blog.craz8.com/articles/2005/12/01/make-your-divs-resizeable ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jerod Venema Sent: Wednesday, January 04, 2006 7:28 AM To: Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Resizeable Has anyone done any work on a "Resizeable" class they''d be willing to share? I''m looking to do some stuff that''ll need resizable divs, but I didn''t want to re-invent the wheel if I can avoid it. -Jerod The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
There are a few bugs.... 1. Fixed - I''d set it to 10 instead of 0 2. There is weirdness at the edges. This is a work in progress, so if anyone wants to help fix bugs.... ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl Sent: Wednesday, January 04, 2006 1:10 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Resizeable Couple of weird things on your demo page... 1) The div that says it has no resize on top can still be resized from the top. 2) For all the divs, if you grab the top and resive all the way to the bottom and keep going, it moves the whole div downwards (the downward movement seems to be capped at a certain number of pixels though). That behavior is not repeated when resizing in other directions. Just some FYIs... -Ryan Gahl ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes Sent: Wednesday, January 04, 2006 3:03 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Resizeable Check out mine here: http://blog.craz8.com/articles/2005/12/01/make-your-divs-resizeable ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jerod Venema Sent: Wednesday, January 04, 2006 7:28 AM To: Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Resizeable Has anyone done any work on a "Resizeable" class they''d be willing to share? I''m looking to do some stuff that''ll need resizable divs, but I didn''t want to re-invent the wheel if I can avoid it. -Jerod The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
As soon as I get to the point in my project when I need that functionality (maybe another week or two), I''ll take a look-see. ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes Sent: Wednesday, January 04, 2006 3:18 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Resizeable There are a few bugs.... 1. Fixed - I''d set it to 10 instead of 0 2. There is weirdness at the edges. This is a work in progress, so if anyone wants to help fix bugs.... ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Ryan Gahl Sent: Wednesday, January 04, 2006 1:10 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Resizeable Couple of weird things on your demo page... 1) The div that says it has no resize on top can still be resized from the top. 2) For all the divs, if you grab the top and resive all the way to the bottom and keep going, it moves the whole div downwards (the downward movement seems to be capped at a certain number of pixels though). That behavior is not repeated when resizing in other directions. Just some FYIs... -Ryan Gahl ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes Sent: Wednesday, January 04, 2006 3:03 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Resizeable Check out mine here: http://blog.craz8.com/articles/2005/12/01/make-your-divs-resizeable ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Jerod Venema Sent: Wednesday, January 04, 2006 7:28 AM To: Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Resizeable Has anyone done any work on a "Resizeable" class they''d be willing to share? I''m looking to do some stuff that''ll need resizable divs, but I didn''t want to re-invent the wheel if I can avoid it. -Jerod The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Thanks all. Tom, I''ll probably play with yours over the next few days; I''ll post back if I figure out the IE issue. -Jerod
I''m integrating Prototype/Scriptaculous into Drupal and I''ve hit up against a problem with the way that Drupal creates froms with multiple elements here''s the code synopsis: ... <form action="url" method="post" id="comment_form"> <input type="text" class="form-text" name="edit[subject]" id="edit- subject" /> <textarea name="edit[comment]" id="edit-comment" ></textarea> <!-- notice the next two lines --> <input type="submit" class="form-submit" name="op" value="Preview comment" /> <input type="submit" class="form-submit" name="op" value="Post comment" /> </form> <script type="text/javascript"> $(''comment_form'').onsubmit = function() { new Ajax.Updater(''div_id'', ''http://example.com/url'', {evalScripts:true, method:''post'', postBody:Form.serialize(this)}); return false; } </script> ... The problem that I''m having is that Drupal is usually able to tell which "op" button was clicked by checking $_POST[''op'']. But when I do Form.serialize(), I get the value for both "op" buttons and the second one overwrites the first, so that $_POST[''op''] is always "Post comment", even if "Preview comment" was selected. So assuming that the type, name, or value of these buttons is hard coded into Drupal, what is the best way for me to find out which "op" button was used? Thanks for any pointers. -Jeff Robbins