Sunday, January 30, 2011

Re: cakePHP 1.3.6 jQuery sortable

Thank you very much for your answer.
Especially that you answered so fast!

On 30 Jan., 02:18, cricket <zijn.digi...@gmail.com> wrote:
> On Sat, Jan 29, 2011 at 5:13 PM, Helmut Leinfellner
>
>
>
> <helmut.leinfell...@gmail.com> wrote:
> > Hello!
>
> > CakePHP 1.3.6, I'using kvas's ajax and javascript helper
> > (http://cakephp.bee.pl/ajax/sortable)
>
> > I've come so far:
>
> > <ul id="sortable">
> >        <li class="ui-state-default"><span class="ui-icon ui-icon-
> > arrowthick-2-n-s"></span>Item 1</li>
> >        <li class="ui-state-default"><span class="ui-icon ui-icon-
> > arrowthick-2-n-s"></span>Item 2</li>
> >        <li class="ui-state-default"><span class="ui-icon ui-icon-
> > arrowthick-2-n-s"></span>Item 3</li>
> >        <li class="ui-state-default"><span class="ui-icon ui-icon-
> > arrowthick-2-n-s"></span>Item 4</li>
> >        <li class="ui-state-default"><span class="ui-icon ui-icon-
> > arrowthick-2-n-s"></span>Item 5</li>
> >        <li class="ui-state-default"><span class="ui-icon ui-icon-
> > arrowthick-2-n-s"></span>Item 6</li>
> >        <li class="ui-state-default"><span class="ui-icon ui-icon-
> > arrowthick-2-n-s"></span>Item 7</li>
> > </ul>
> > <?=$ajax->sortable('sortable')?>
>
> > works fine to rearrange the order of elements.
>
> > I am looking for a solution on how to save the (new arranged) order of
> > elements to a MySQL table.
>
> > Any help much appreciated!
>
> > Helmut
>
> Here's how I did it:http://pastebin.com/G5GhNzPk
>
> I created a sortable element so that I can include it into a view for
> any model. The 'table' => true option is because some of the sortable
> lists are in tables and some unordered lists.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: