Drag & drop on two different tables?

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
Hamlet55
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Fri Aug 02, 2013 9:27 am

Drag & drop on two different tables?

Post by Hamlet55 » Sun Apr 26, 2015 5:51 pm

Hi,

I have a view with a few tabs and on two are tables where I would like to have possibilty to change the order via drag & drop. One table is no problem but I'd like to have the drag & drop functionality also on the second table.
I figured the functionality is triggered with this line

Code: Select all

JHtml::_( 'sortablelist.sortable', 'quList', 'adminForm', strtolower($listDirn), $saveOrderingUrl, false, true );
adding the same line with a differen "List" isn't working.
Is there a way to have two tables in one view with drag & drop?
And how is it done?

Thanks in advance

Hamlet55
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Fri Aug 02, 2013 9:27 am

Re: Drag & drop on two different tables?

Post by Hamlet55 » Mon Apr 27, 2015 8:22 am

I don't know if this is a good solution but I found a work around:
Both have tables have the same id ( here "quList" ) but the rows have the attribute sortable-group-id="1" and on the other table "2".
I don't use Ajax because I didn't get it running in this version with multiple models, so I save the new order in the function save().

If there is a better way, I really would like to hear?!

Thanks


Locked

Return to “Joomla! 3.x Coding”