Ed C.
2005-Aug-02 14:40 UTC
[Rails-spinoffs] Scriptaculous: Sortable (dragdrop.js) onUpdate
Hi all, In the following code, it doesn''t look like the onUpdate() event is firing. Am I doing something wrong? <ul id="testSort"> <li id="item1">item 1</li> <li id="item2">item 2</li> <li id="item3">item 3</li> <li id="item4">item 4</li> <li id="item5">item 5</li> </ul> <script type="text/javascript"> //<![CDATA[ Sortable.create( "testSort", { onUpdate : function() { alert("updating"); } } ); //]]> </script> Thanks, Ed C. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20050802/68c74480/attachment.html
Claude Hussenet
2005-Aug-31 09:30 UTC
[Rails-spinoffs] Scriptaculous: Sortable (dragdrop.js) onUpdate
> Did have a chance to get a answer to your question ? > I downloaded the latest version(1.5-pre3) and it''s > still > not working..The onUpdate is fired when an item > dropped > between 2 lists but not when it''s dropped within the > same > list. > > Thx U for your help. > Rgds-Claude >Claude Hussenet Independent J2EE Architect Consultant http://claudehussenet.com ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs
Thomas Fuchs
2005-Sep-02 13:52 UTC
[Rails-spinoffs] Scriptaculous: Sortable (dragdrop.js) onUpdate
Have you set up the lists as described on the documentation page? http://wiki.script.aculo.us/scriptaculous/show/FAQ see question 4.3 It boils down to: "Note that the id attributes of the elements contained in the Sortable must be named as described in Sortable.serialize". Sortable.serialize states that: Important: For this to work, the elements contained in your Sortable must have id attributes in the following form: id="string_identifier" // example: id="image_1" Only the identifier part of the id attribute will be serialized. If you want to use an other form of id attributes, you need to implement your own serialization. The onUpdate callback should then work with no problems, as seen in this functional test file in the SVN trunk: test/functional/sortable2_test.html Thomas Am 31.08.2005 um 16:25 schrieb Claude Hussenet:> > > >> Did have a chance to get a answer to your question ? >> I downloaded the latest version(1.5-pre3) and it''s >> still >> not working..The onUpdate is fired when an item >> dropped >> between 2 lists but not when it''s dropped within the >> same >> list. >> >> Thx U for your help. >> Rgds-Claude >> >> > > Claude Hussenet > Independent J2EE Architect Consultant > http://claudehussenet.com > > > > ____________________________________________________ > Start your day with Yahoo! - make it your home page > http://www.yahoo.com/r/hs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Claude Hussenet
2005-Sep-02 14:06 UTC
[Rails-spinoffs] Scriptaculous: Sortable (dragdrop.js) onUpdate
Thanks u Thomas for your answer. "must be named as described in Sortable.serialize" =>was my problem ! As reported yesterday,it''s now working. Portlets can be dragged and dropped and on the onUpdate function I do an asynchronous to the server to update the location of the portlets. Here it is www.claudehussenet.com Thank u for your reply ,I really appreciate it. Rgds-Claude --- Thomas Fuchs <thomas@fesch.at> wrote:> Have you set up the lists as described on the > documentation page? > http://wiki.script.aculo.us/scriptaculous/show/FAQ > see question 4.3 > > It boils down to: "Note that the id attributes of > the elements > contained in the Sortable must be named as described > in > Sortable.serialize". > > Sortable.serialize states that: > Important: For this to work, the elements contained > in your Sortable > must have id attributes in the following form: > id="string_identifier" > // example: id="image_1" > Only the identifier part of the id attribute will be > serialized. > > If you want to use an other form of id attributes, > you need to > implement your own serialization. > > The onUpdate callback should then work with no > problems, as seen in > this functional test file in the SVN trunk: > test/functional/sortable2_test.html > > Thomas > > Am 31.08.2005 um 16:25 schrieb Claude Hussenet: > > > > > > > > >> Did have a chance to get a answer to your > question ? > >> I downloaded the latest version(1.5-pre3) and > it''s > >> still > >> not working..The onUpdate is fired when an item > >> dropped > >> between 2 lists but not when it''s dropped within > the > >> same > >> list. > >> > >> Thx U for your help. > >> Rgds-Claude > >> > >> > > > > Claude Hussenet > > Independent J2EE Architect Consultant > > http://claudehussenet.com > > > > > > > > > ____________________________________________________ > > Start your day with Yahoo! - make it your home > page > > http://www.yahoo.com/r/hs > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > >http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs> > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs>Claude Hussenet Independent J2EE Architect Consultant http://claudehussenet.com __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail