mariaczi
(Marekurbanowicz)
1
Hi!
I want to create page in ClientPanel where user can Add and Sort items.
Ajax adding is no problem, but I dont know how to saving order from jQuery UI sortable.
I found tutorial: http://www.yiiframework.com/wiki/69/ordering-models-by-weight-with-cjuisortable but its not auto and author making order by dropdown list,not from built in order from jQuery UI sortable.
Can someone help?
I want to saving order allways when user change position of some item.
You need to use the toArray function of JQuery sortable, then you can pass the array through the ajax request and save the IDs in correct order.