Scripty 1.6.1 has a sortable tree. You just make a new sortable on the parent list element and pass tree:true in options and it includes all child lists to make one big sortable tree.
On 11/07/06, Justin McCormack <[EMAIL PROTECTED]> wrote:
Hi, Forgive me if this has been discussed/resolved before. I have done a search of both this mailing list and the web, but I can't find a solution to my problem (which is odd as I would think plenty of people would have the same requirement and therefore the same problem). Basically, I have a OL of "Questions". Each question has an OL of "Answers". The user needs to be able to order the questions and also the answers within each question. Here is some HTML and script that demonstrates the issue: <ol id="questionList1" class="questionsList"> <li class="question" id="question1"> <span class="questionTitle">Question 1</span> <ol id="answerList1" class="answersList"> <li class="answer">Answer 1</li> <li class="answer">Answer 2</li> </ol> </li> <li class="question" id="question2"> <span class="questionTitle">Question 2</span> <ol id="answerList2" class="answersList"> <li class="answer">Answer 1</li> <li class="answer">Answer 2</li> </ol> </li> </ol> <script type="text/javascript"> Sortable.create("questionList1", {only: "question", handle: "questionTitle"}); Sortable.create("answerList1", {only: "answer"}); Sortable.create("answerList2", {only: "answer"}); </script> By creating a sortable on the sub OL (answersLists), it stops the main questionsList from being sortable (i.e can't sort questions). If we comment out the Sortable.create for the two answer lists, the main questions sortable works fine. Am I doing something wrong (obviously)? Is it possible to acheive what I need with Sortables? Thanks in advance, Justin _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
-- Andrew Tetlaw htp://tetlaw.id.au _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs