I'm attempting to solve #859700: Put admin interface in block for Drupal 6 over at a sandbox for nodequeue_block.module.

I have them working, unless there is more than one nodequeue admin form on a page. When there's more than one they don't work.

I think this is because the admin forms all have the same form_id ('nodequeue_arrange_subqueue_form'). Is there a reason they don't have a unique identifier for each nodequeue? I'm guessing it's because it just wasn't necessary?

Any direction on this? If I can get multiple blocks to work on one page, I've got it working.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Rob_Feature’s picture

Just found this on line 2837 of nodequeue.module:

  // TODO: Create unique ID to make multiple tabledrag forms on a page possible

I overrode the theme function to get tabledrag working (by giving each a unique id).

However, when altering the nodequeue (adding/removing) it performs the action on the first table in the page, not the one I'm working on.

(mostly talking to myself at this point)

Rob_Feature’s picture

Title: Non-Unique form_id for admin forms » Make form_id unique on each nodequeue admin form
Category: support » feature

Re-titling. This is the last barrier (I think) to getting the nodequeue admins into blocks.

amateescu’s picture

Status: Active » Postponed (maintainer needs more info)

This feature imposes a massive rewrite of nodequeue_dragdrop.js. Besides this nodequeue_block implementation, are there any other use cases for adding multiple subqueue tabledrag forms on a page?

Rob_Feature’s picture

As mentioned in another issue, we'll be proposing a patch to the .js file along with the nodequeue_block module and you can check it out there. Watch for an issue about nodequeue_block which will include the patch.

amateescu’s picture

Can't wait for it :)

Rob_Feature’s picture

Status: Postponed (maintainer needs more info) » Fixed

see #1169650: Patch To Create Nodequeue Admins as Blocks for a patch that worked with 2.9...but stopped working with 2.10 (grrrrrr)

amateescu’s picture

Status: Fixed » Active

Well.. not yet fixed. I'll take some hunks from your patch in #1169650: Patch To Create Nodequeue Admins as Blocks, create a patch for this issue and then take care of the nodequeue_block implementation.

Rob_Feature’s picture

Great thanks....marked it as fixed since if figured it would be moved to the other issue, but if you want to address this individually that's great.

amateescu’s picture

Status: Active » Needs review
FileSize
11.77 KB

Phew, this was bigger than I initially thought. I took what I could from your patch in #1169650: Patch To Create Nodequeue Admins as Blocks and fixed some remaining issues:

- reverse in admin view wasn't working
- got rid of theme_registry_alter() by specifying $form['#theme'] in nodequeue_arrange_subqueue_form()
- cleaned up nodequeue_dragdrop.js

And here's the patch for 6.x-2.x-dev, this should now make the nodequeue_block patch a breeze :)

EDIT: Wow, this feature doesn't have any impact on memory performance (checked with Devel Performance)!

amateescu’s picture

Ok, I gave this another round of testing and decided to commit the attached patches to 6.x and 7.x.

The 7.x patch contains a lot of additional js fixes, restoring feature parity with 6.x.

http://drupalcode.org/project/nodequeue.git/commit/02788e8
http://drupalcode.org/project/nodequeue.git/commit/00b0aad

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.