Page 1 of 2

Drag and drop sort list items

Posted: Mon Dec 30, 2013 2:38 pm
by Bert Vandenbogaerde

Is there a way to sort the list items like this example:
http://jqueryui.com/sortable/#default

Important is that it saves the order to the database.
I have a column in my database collection called "sorting".
I now work with the request parameter "sort".
It reads the values (1,2,3,etc) from the database and puts it in the right order.

I want to create my app so that the user can define his own sort order (like the example http://jqueryui.com/sortable/#default , a simple drag and drop made for touch screen)


Drag and drop sort list items

Posted: Mon Dec 30, 2013 3:43 pm
by Kateryna Grynko

Hi Bert,

Yes, you can do this within Appery.io. Let us know if you have any specific question.


Drag and drop sort list items

Posted: Mon Dec 30, 2013 3:58 pm
by Bert Vandenbogaerde

Hello Katya

What is the best approach to start from?
Javascript or something else?
Is there a tutorial on that somewhere?

Thank You.


Drag and drop sort list items

Posted: Mon Dec 30, 2013 4:50 pm
by Bert Vandenbogaerde

i am currently working with this question which was answered by Max.

https://getsatisfaction.com/apperyio/...

I follow the steps but it does not work, probably because things have changed the past year.

can you help me figure it out?


Drag and drop sort list items

Posted: Mon Dec 30, 2013 4:56 pm
by Kateryna Grynko

Bert,

You would need some custom JS code to implement this.
http://docs.appery.io/getting-started/
http://docs.appery.io/tutorials/


Drag and drop sort list items

Posted: Mon Dec 30, 2013 5:01 pm
by Kateryna Grynko

Sure. Please share your application with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell us where to see this.


Drag and drop sort list items

Posted: Mon Dec 30, 2013 5:06 pm
by Bert Vandenbogaerde

I shared it now.
it can be found under pages- TESTvolgordewijzigen
The javascript event is placed under "list" component when clicked


Drag and drop sort list items

Posted: Mon Dec 30, 2013 5:54 pm
by Kateryna Grynko

We'll take a look and update.


Drag and drop sort list items

Posted: Mon Dec 30, 2013 8:40 pm
by Kateryna Grynko

Bert,

Add http://code.jquery.com/ui/1.10.3/jque... in External sources or as custom JavaScript.


Drag and drop sort list items

Posted: Mon Dec 30, 2013 9:33 pm
by Bert Vandenbogaerde

hello

i added the code as external source but it does not help for the moment.

Any other ideas?