A funny thing. I have two lists which I do Sortable.create on. The goal
was to be able to sort and drag elements between lists. According to
scriptaculous wiki it is supported since v1.0 via
''containment'' option.
So why does not it work for me?
I stripped down real page to just two lists here. You can drag from top
to the bottom but not from bottom to the top.
Any ideas?
<html><head>
<script src="http://script.aculo.us/prototype.js"
type="text/javascript"></script>
<script src="http://script.aculo.us/scriptaculous.js"
type="text/javascript"></script>
<title>Admin</title>
</head><body>
<div>
<ul id="ulselected" style="overflow-y: scroll; overflow-x:
hidden;
height: 300px; border:1px solid black"><li id="s675">
40th Anniversary
- Every Episode Ever - Long Sleeve Shirt - S </li><li
id="s689"> 40th
Anniversary Logo Ball Cap </li></ul>
<script type="text/javascript">
//<![CDATA[
Sortable.create(''ulselected'', {constraint:false,
containment:[''ulselected'',''ulall''],
onUpdate:function(){new
Ajax.Request('''', {asynchronous:true, evalScripts:true,
parameters:Sortable.serialize(''ulselected'')})}})
//]]>
</script>
</div>
<div style="border:1x solid black">
<ul id="ulall" style="overflow-y: scroll; overflow-x:
hidden;
height: 300px; border:1px solid black"><li id="a151">
Star Trek: Deep
Space Nine - The Complete First Season </li><li
id="a1513"> Star Trek:
Deep Space Nine - The Complete First Season2 </li></ul>
<script type="text/javascript">
//<![CDATA[
Sortable.create(''ulall'', {constraint:false,
containment:[''ulall'',''ulselected''],
onUpdate:function(){new
Ajax.Request('''', {asynchronous:true, evalScripts:true,
parameters:Sortable.serialize(''ulall'')})}})
//]]>
</script>
</div>
</body></html>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---