[Proto-Scripty] Move sortables with javascript?

2012-05-22 Thread shanert
Is there a way to move a sortables with javascript?

Example: A user sorts a few divs and the order is stored in a cookie with 
Sortable.serialize. How to use the data in the cookie to rearrange the divs 
to the order of the user, when he is visiting the site the next time?

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/-ZXsnxsRFNMJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Move sortables with javascript?

2012-05-22 Thread Walter Lee Davis
It doesn't seem to be documented, but there is a setSequence(element, 
new_sequence) method in Sortable. 
http://madrobby.github.com/scriptaculous/sortable/ 

Have a dig through the source and see what it expects. 
https://github.com/madrobby/scriptaculous/blob/master/src/dragdrop.js#L906

Walter

On May 22, 2012, at 6:05 AM, shanert wrote:

 Is there a way to move a sortables with javascript?
 
 Example: A user sorts a few divs and the order is stored in a cookie with 
 Sortable.serialize. How to use the data in the cookie to rearrange the divs 
 to the order of the user, when he is visiting the site the next time?
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/prototype-scriptaculous/-/-ZXsnxsRFNMJ.
 To post to this group, send email to prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Move sortables with javascript?

2012-05-22 Thread Wojtek Zadora
I do not know if my advice will be valuable for you but I would avoid 
sorting divs with javascript.
I think better way is to read the cookie in php and render a page with 
divs in order according to cookie data. Difficulty of that task is 
probably determinded by the way you render you html pages. With some 
template engine (like smarty) should be rather easy...


-wz



Is there a way to move a sortables with javascript?

Example: A user sorts a few divs and the order is stored in a cookie 
with Sortable.serialize. How to use the data in the cookie to 
rearrange the divs to the order of the user, when he is visiting the 
site the next time?

--
You received this message because you are subscribed to the Google 
Groups Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/-ZXsnxsRFNMJ.
To post to this group, send email to 
prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups Prototype 
 script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Move sortables with javascript?

2012-05-22 Thread shanert
setSequence, that did the trick, great, many thanks!

Am Dienstag, 22. Mai 2012 14:28:31 UTC+2 schrieb Walter Lee Davis:

 It doesn't seem to be documented, but there is a setSequence(element, 
 new_sequence) method in Sortable. 
 http://madrobby.github.com/scriptaculous/sortable/ 

 Have a dig through the source and see what it expects. 
 https://github.com/madrobby/scriptaculous/blob/master/src/dragdrop.js#L906 

 Walter 

 On May 22, 2012, at 6:05 AM, shanert wrote: 

  Is there a way to move a sortables with javascript? 
  
  Example: A user sorts a few divs and the order is stored in a cookie 
 with Sortable.serialize. How to use the data in the cookie to rearrange the 
 divs to the order of the user, when he is visiting the site the next time? 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups Prototype  script.aculo.us group. 
  To view this discussion on the web visit 
 https://groups.google.com/d/msg/prototype-scriptaculous/-/-ZXsnxsRFNMJ. 
  To post to this group, send email to 
 prototype-scriptaculous@googlegroups.com. 
  To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com. 
  For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en. 



-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/oFvoZRVAfv0J.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Move sortables with javascript?

2012-05-22 Thread Walter Lee Davis
Please take a moment to update the Wiki with a brief explanation of the method!

Walter

On May 22, 2012, at 12:12 PM, shanert wrote:

 setSequence, that did the trick, great, many thanks!
 
 Am Dienstag, 22. Mai 2012 14:28:31 UTC+2 schrieb Walter Lee Davis:
 It doesn't seem to be documented, but there is a setSequence(element, 
 new_sequence) method in Sortable. 
 http://madrobby.github.com/scriptaculous/sortable/ 
 
 Have a dig through the source and see what it expects. 
 https://github.com/madrobby/scriptaculous/blob/master/src/dragdrop.js#L906 
 
 Walter 
 
 On May 22, 2012, at 6:05 AM, shanert wrote: 
 
  Is there a way to move a sortables with javascript? 
  
  Example: A user sorts a few divs and the order is stored in a cookie with 
  Sortable.serialize. How to use the data in the cookie to rearrange the divs 
  to the order of the user, when he is visiting the site the next time? 
  
  -- 
  You received this message because you are subscribed to the Google Groups 
  Prototype  script.aculo.us group. 
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/prototype-scriptaculous/-/-ZXsnxsRFNMJ. 
  To post to this group, send email to 
  prototype-scriptaculous@googlegroups.com. 
  To unsubscribe from this group, send email to 
  prototype-scriptaculous+unsubscr...@googlegroups.com. 
  For more options, visit this group at 
  http://groups.google.com/group/prototype-scriptaculous?hl=en. 
 
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Prototype  script.aculo.us group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/prototype-scriptaculous/-/oFvoZRVAfv0J.
 To post to this group, send email to prototype-scriptaculous@googlegroups.com.
 To unsubscribe from this group, send email to 
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.