By carlwenrich on
I've created the code and some pages for a Drupal 7 tabledrag demo. The demo site is here.
Please use the "Contact Carl" main menu option on the site if you have any questions or comments.
I've created the code and some pages for a Drupal 7 tabledrag demo. The demo site is here.
Please use the "Contact Carl" main menu option on the site if you have any questions or comments.
Comments
Can't see table
Hi,
Thank you for this nice example, already searching for a long time to get a good example. I only have one problem.
I only see the weight column and nothing more. I'm using the same code as in your example. I've changed "type => textfield" to "type => weight", but this didn't causes the problem I've tried both.
Do you have any idea how I can solve this problem?
Thanks,
Rik
Leave the type as textfield.
See user_admin_roles for an example from the Drupal 7 core. If you change it to "weight" you'll get a select box that becomes unwieldy when you have a large number of entries.
If you change anything in the theming, install the devel module and click the "Empty cache" link to update the theme registration.
Of course it goes without saying that you need all five parts:
Got it
Hi,
Thanks for your reply, got it working. I had some naming conflicts, but it is all working now.
I only had one small issue. When I click "Show row weights" the row weights show as it should be, but I can't set it back to dragging. Somehow the "Hide row weights" doesn't work. When I hit the save button it will go back to dragging. But atm this isn't a big issue for me
Thanks,
Rik
Don't know what that could be.
Go to Structure > Menus > Main menu > list links.
Click "Show row weights" there and see if you have the same problem.
Fixed
Sorry for the late reply.
The problem has been solved, it was happening on a drupal 7.2 installation (My own table as well as the menu table). On drupal 7.9 it seems to be resolved.
Added introductory and explanatory text
Each function is now fully documented, and the code has been simplified.
The site is here.
Added edit and delete operations
The "edit" and "delete" operations have been added to the tabledrag demo.
The site is here.
The website is unavailable
Hello,
I'm am very interested about your example but it's impossible to access to the website. Can you post it again somewhere?
Thanks
Simon