Phillip Koebbe
2007-Oct-15 02:31 UTC
Sortable.create problem on Safari using :tag => ''tr''
Hi all. I''m developing on Mac OS X using RoR 1.2.3, Safari 2.0.4 (419.3) and Firefox 2.0.0.7. I created a sortable list using a table, and it worked fine in Firefox but did not work in Safari. The code was something like <%= sortable_element (''payment_methods'', :url => {:action => :sort}, :tag => ''tr'') I first tried with the table''s id = ''payment_methods'' with each of the sortable rows being assigned a class of "sortable", and passing :only => ''sortable'' in the options. Then I changed it to use a thead and tbody, and gave the tbody the id of ''payment_methods'' and took out the :only definition. Neither way worked. Ultimately, I changed it to use divs and now it works in both Safari and Firefox, but I''d prefer to be able to sort the table rows. Is there a problem with sorting table rows in Safari? Peace, Phillip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tobie Langel
2007-Oct-15 03:04 UTC
Re: Sortable.create problem on Safari using :tag => ''tr''
Please try the latest version of Prototype in trunk and tell us if the problem still arises. Regards, Tobie Phillip Koebbe wrote:> Hi all. I''m developing on Mac OS X using RoR 1.2.3, Safari 2.0.4 > (419.3) and Firefox 2.0.0.7. I created a sortable list using a table, > and it worked fine in Firefox but did not work in Safari. > > The code was something like > > <%= sortable_element (''payment_methods'', :url => {:action > => :sort}, :tag => ''tr'') > > I first tried with the table''s id = ''payment_methods'' with each of the > sortable rows being assigned a class of "sortable", and passing :only > => ''sortable'' in the options. Then I changed it to use a thead and > tbody, and gave the tbody the id of ''payment_methods'' and took out > the :only definition. Neither way worked. > > Ultimately, I changed it to use divs and now it works in both Safari > and Firefox, but I''d prefer to be able to sort the table rows. Is > there a problem with sorting table rows in Safari? > > Peace, > Phillip--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Koebbe
2007-Oct-15 12:00 UTC
Re: Sortable.create problem on Safari using :tag => ''tr''
Hi Tobie, I just downloaded 1.6.0_rc0 from svn and built it with rake dist. Moved it to my projects public/javascripts folder and fired up the project. In Firefox, the very first drag/drop works, but then Firebug gets filled with recursion errors at prototype.js:239. I finally closed the tab at about 19000 errors. It didn''t sort at all in Safari, but the javascript console was filling up with "max stack" errors there. I didn''t think to check the prototype version yesterday. It was 1.5.0. I see that 1.5.1.1 is available. I''ll try that next. Thanks for the input. Peace, Phillip On Oct 14, 10:04 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Please try the latest version of Prototype in trunk and tell us if the > problem still arises. > > Regards, > > Tobie > > Phillip Koebbe wrote: > > Hi all. I''m developing on Mac OS X using RoR 1.2.3, Safari 2.0.4 > > (419.3) and Firefox 2.0.0.7. I created a sortable list using a table, > > and it worked fine in Firefox but did not work in Safari. > > > The code was something like > > > <%= sortable_element (''payment_methods'', :url => {:action > > => :sort}, :tag => ''tr'') > > > I first tried with the table''s id = ''payment_methods'' with each of the > > sortable rows being assigned a class of "sortable", and passing :only > > => ''sortable'' in the options. Then I changed it to use a thead and > > tbody, and gave the tbody the id of ''payment_methods'' and took out > > the :only definition. Neither way worked. > > > Ultimately, I changed it to use divs and now it works in both Safari > > and Firefox, but I''d prefer to be able to sort the table rows. Is > > there a problem with sorting table rows in Safari? > > > Peace, > > Phillip--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Koebbe
2007-Oct-15 12:12 UTC
Re: Sortable.create problem on Safari using :tag => ''tr''
I tried with 1.5.1.1, and got the recursion error again, but this time at line 1323. To verify my sanity, I went back to 1.5.0 and tried it again. It still worked fine in Firefox (no recursion errors!), but not in Safari. So, for now, I''ll go back to using divs and spans. Thanks for the assistance! Peace, Phillip On Oct 15, 7:00 am, Phillip Koebbe <phillipkoe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Tobie, > > I just downloaded 1.6.0_rc0 from svn and built it with rake dist. > Moved it to my projects public/javascripts folder and fired up the > project. In Firefox, the very first drag/drop works, but then Firebug > gets filled with recursion errors at prototype.js:239. I finally > closed the tab at about 19000 errors. It didn''t sort at all in > Safari, but the javascript console was filling up with "max stack" > errors there. > > I didn''t think to check the prototype version yesterday. It was > 1.5.0. I see that 1.5.1.1 is available. I''ll try that next. > > Thanks for the input. > > Peace, > Phillip > > On Oct 14, 10:04 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Please try the latest version of Prototype in trunk and tell us if the > > problem still arises. > > > Regards, > > > Tobie > > > Phillip Koebbe wrote: > > > Hi all. I''m developing on Mac OS X using RoR 1.2.3, Safari 2.0.4 > > > (419.3) and Firefox 2.0.0.7. I created a sortable list using a table, > > > and it worked fine in Firefox but did not work in Safari. > > > > The code was something like > > > > <%= sortable_element (''payment_methods'', :url => {:action > > > => :sort}, :tag => ''tr'') > > > > I first tried with the table''s id = ''payment_methods'' with each of the > > > sortable rows being assigned a class of "sortable", and passing :only > > > => ''sortable'' in the options. Then I changed it to use a thead and > > > tbody, and gave the tbody the id of ''payment_methods'' and took out > > > the :only definition. Neither way worked. > > > > Ultimately, I changed it to use divs and now it works in both Safari > > > and Firefox, but I''d prefer to be able to sort the table rows. Is > > > there a problem with sorting table rows in Safari? > > > > Peace, > > > Phillip--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Tobie Langel
2007-Oct-15 12:24 UTC
Re: Sortable.create problem on Safari using :tag => ''tr''
Hi, You are probably using it with an incompatible version of scriptaculous. Regards, Tobie On Oct 15, 2:12 pm, Phillip Koebbe <phillipkoe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I tried with 1.5.1.1, and got the recursion error again, but this time > at line 1323. To verify my sanity, I went back to 1.5.0 and tried it > again. It still worked fine in Firefox (no recursion errors!), but > not in Safari. > > So, for now, I''ll go back to using divs and spans. > > Thanks for the assistance! > > Peace, > Phillip > > On Oct 15, 7:00 am, Phillip Koebbe <phillipkoe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi Tobie, > > > I just downloaded 1.6.0_rc0 from svn and built it with rake dist. > > Moved it to my projects public/javascripts folder and fired up the > > project. In Firefox, the very first drag/drop works, but then Firebug > > gets filled with recursion errors at prototype.js:239. I finally > > closed the tab at about 19000 errors. It didn''t sort at all in > > Safari, but the javascript console was filling up with "max stack" > > errors there. > > > I didn''t think to check the prototype version yesterday. It was > > 1.5.0. I see that 1.5.1.1 is available. I''ll try that next. > > > Thanks for the input. > > > Peace, > > Phillip > > > On Oct 14, 10:04 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Please try the latest version of Prototype in trunk and tell us if the > > > problem still arises. > > > > Regards, > > > > Tobie > > > > Phillip Koebbe wrote: > > > > Hi all. I''m developing on Mac OS X using RoR 1.2.3, Safari 2.0.4 > > > > (419.3) and Firefox 2.0.0.7. I created a sortable list using a table, > > > > and it worked fine in Firefox but did not work in Safari. > > > > > The code was something like > > > > > <%= sortable_element (''payment_methods'', :url => {:action > > > > => :sort}, :tag => ''tr'') > > > > > I first tried with the table''s id = ''payment_methods'' with each of the > > > > sortable rows being assigned a class of "sortable", and passing :only > > > > => ''sortable'' in the options. Then I changed it to use a thead and > > > > tbody, and gave the tbody the id of ''payment_methods'' and took out > > > > the :only definition. Neither way worked. > > > > > Ultimately, I changed it to use divs and now it works in both Safari > > > > and Firefox, but I''d prefer to be able to sort the table rows. Is > > > > there a problem with sorting table rows in Safari? > > > > > Peace, > > > > Phillip--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Matt Foster
2007-Oct-15 16:04 UTC
Re: Sortable.create problem on Safari using :tag => ''tr''
I thought TR elements weren''t supported by sortable? I am not certain but I remember hearing about this before. On Oct 15, 8:24 am, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > You are probably using it with an incompatible version of > scriptaculous. > > Regards, > > Tobie > > On Oct 15, 2:12 pm, Phillip Koebbe <phillipkoe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I tried with 1.5.1.1, and got the recursion error again, but this time > > at line 1323. To verify my sanity, I went back to 1.5.0 and tried it > > again. It still worked fine in Firefox (no recursion errors!), but > > not in Safari. > > > So, for now, I''ll go back to using divs and spans. > > > Thanks for the assistance! > > > Peace, > > Phillip > > > On Oct 15, 7:00 am, Phillip Koebbe <phillipkoe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi Tobie, > > > > I just downloaded 1.6.0_rc0 from svn and built it with rake dist. > > > Moved it to my projects public/javascripts folder and fired up the > > > project. In Firefox, the very first drag/drop works, but then Firebug > > > gets filled with recursion errors at prototype.js:239. I finally > > > closed the tab at about 19000 errors. It didn''t sort at all in > > > Safari, but the javascript console was filling up with "max stack" > > > errors there. > > > > I didn''t think to check the prototype version yesterday. It was > > > 1.5.0. I see that 1.5.1.1 is available. I''ll try that next. > > > > Thanks for the input. > > > > Peace, > > > Phillip > > > > On Oct 14, 10:04 pm, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Please try the latest version of Prototype in trunk and tell us if the > > > > problem still arises. > > > > > Regards, > > > > > Tobie > > > > > Phillip Koebbe wrote: > > > > > Hi all. I''m developing on Mac OS X using RoR 1.2.3, Safari 2.0.4 > > > > > (419.3) and Firefox 2.0.0.7. I created a sortable list using a table, > > > > > and it worked fine in Firefox but did not work in Safari. > > > > > > The code was something like > > > > > > <%= sortable_element (''payment_methods'', :url => {:action > > > > > => :sort}, :tag => ''tr'') > > > > > > I first tried with the table''s id = ''payment_methods'' with each of the > > > > > sortable rows being assigned a class of "sortable", and passing :only > > > > > => ''sortable'' in the options. Then I changed it to use a thead and > > > > > tbody, and gave the tbody the id of ''payment_methods'' and took out > > > > > the :only definition. Neither way worked. > > > > > > Ultimately, I changed it to use divs and now it works in both Safari > > > > > and Firefox, but I''d prefer to be able to sort the table rows. Is > > > > > there a problem with sorting table rows in Safari? > > > > > > Peace, > > > > > Phillip--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Koebbe
2007-Oct-16 03:46 UTC
Re: Sortable.create problem on Safari using :tag => ''tr''
I thought that at one time too, but apparently not. It works great in Firefox, and I seem to remember seeing an example somewhere on the web. Peace, Phillip On Oct 15, 11:04 am, Matt Foster <mattfoste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I thought TR elements weren''t supported by sortable? > > I am not certain but I remember hearing about this before. >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Koebbe
2007-Oct-16 03:51 UTC
Re: Sortable.create problem on Safari using :tag => ''tr''
Hi again, Tobie. Thanks for the suggestion. I downloaded the latest two versions of the scriptaculous library (1.7.1 beta 3 and 1.8.0 pre 1) and tried them with the proper corresponding prototype libraries: scriptaculous 1.7.1_beta3 with prototype 1.5.1 (and 1.5.1.1) scriptaculous 1.8.0_pre1 with prototype 1.6.0_rc0 The results are the same. It works in Firefox, but not in Safari. Here is my code: list.rhtml: <h1>Listing Payment Methods</h1> <small><i>drag and drop to reorder the list</i></small> <p /> <table> <thead> <tr> <th>Description</th> <td class="no_border"></td> <td class="no_border"></td> </tr> </thead> <tbody id="payment_methods"> <%= render :partial => ''payment_method_list'' %> </tbody> </table> <% sortable_element( ''payment_methods'', :url => {:action => :sort}, :tag => ''tr'' ) %> <p /> <%= link_to ''New Payment Method'', :action => ''new'' %> _payment_method_list.rhtml: <% for pm in @payment_methods %> <tr id="pmid_<%= pm.id %>"> <td><%= pm.description %></td> <td> <%= link_to ''Edit'', :action => :edit, :id => pm %> </td> <td> <%= link_to ''Delete'', {:action => :destroy, :id => pm}, :confirm => ''Are you sure?'', :method => :post %> </td> </tr> <% end %> Peace, Phillip On Oct 15, 7:24 am, Tobie Langel <tobie.lan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > You are probably using it with an incompatible version of > scriptaculous. > > Regards, > > Tobie--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---