Bert Vandenbogaerde
Posts: 0
Joined: Thu Dec 19, 2013 11:10 am

Drag and drop sort list items

It works! Thank you!!!

Bert Vandenbogaerde
Posts: 0
Joined: Thu Dec 19, 2013 11:10 am

Drag and drop sort list items

Is it normal that it does not work in the preview app from papery on iPhone?

In my browser on the mac it works fine.

Bert Vandenbogaerde
Posts: 0
Joined: Thu Dec 19, 2013 11:10 am

Drag and drop sort list items

I found an interesting solution which can help others:

Since the Jquery library does not support touch based events (yet) there is a workaround for this.

It consists of two javascript files that have to be added in the project.
The files can be found on github through this link.

https://github.com/yeco/jquery-ui-tou...

Bert Vandenbogaerde
Posts: 0
Joined: Thu Dec 19, 2013 11:10 am

Drag and drop sort list items

Now that this is sorted out i have a related question.

How can i map the sort order back to the database?

I would like to use the automatically generated values of the numbered list (1, 2, 3, etc...)

How do i retrieve that automatically generated value?

Thanks for the great support.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Drag and drop sort list items

Hi Bert,

Thank you for sharing about this solution.

Now on your question: - define what kind of data you want to store in DB;

  • each element of the list can have it's attribute and have it's own element (e.g. label, or hidden label) which contains the data you want to save.
  • pass through the list preul/pre and save all the data to the array, this should help :: http://api.jquery.com/category/traver...
Bert Vandenbogaerde
Posts: 0
Joined: Thu Dec 19, 2013 11:10 am

Drag and drop sort list items

Hi,

I know how to write data to the database but i would like to use the automatically generated values of the numbered list (1, 2, 4)
Image

How can i retrieve those numbers to map it to the database?

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

Drag and drop sort list items

There is no way to do this automatically. You should use js.
See http://api.jquery.com/category/traver...

Return to “Issues”