PDA

View Full Version : Sort element and swap them with an "onclick" event



Santana635
30 Sep 2011, 5:24 AM
Hi, first of all sorry for my english ;)
I want to create a sortable list. But the user will not drag and drop elements with his finger. He has to click on an arrow for downstair and upstair :
28443
28443

So when he clicks on an arrow (the 'up' and 'down' on this nice draw ;) ). The elements will be swapped with a nice effect. What is the best way to do that ? I tried with "Ext.util.Sortable" but I don't know how to change the "touch event" to a "click event" fired by an html tag (a div). I can make a list with a store, and with the 'onclick event' change the order in the store and then refresh all. But I want a nice effect !!!
Thanks in advance