Move vertical tabs integration for Flag into flag.module

Dave Reid - November 7, 2009 - 00:14
Project:Flag
Version:6.x-2.x-dev
Component:User interface
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Currently there is flag.module support from inside vertical_tabs.module. We should move it out and into the actual flag.module for the following reasons:
1. This is the way that the D7-version of vertical tabs will work. Sub-modules will do their own support for vertical tabs.
2. It allows the integrating module maintainers to control their own code incase their form items change, etc instead of relying on a patch to a module not their own (ironically, not the case here, but still).
3. Saves unnecessary JS from being loaded when modules are not installed or used.

AttachmentSize
flag-veritcaltabs-D6-2.patch1.38 KB

#1

quicksketch - November 7, 2009 - 05:55

Sounds good to me. This works with (or is similar to) Drupal 7's vertical tabs implementation too right? It'll be great to get a head-start on the D7 port with some compatible code. Thanks for sending the patch this way, it'll be a good enhancement and definitely belongs in Flag sooner or later.

#2

Dave Reid - November 7, 2009 - 14:31

Yes, I believe this is at least very similar to the D7-style integration, just obviously without the module_exists() check. I'm working on an Integration handbook page for Vertical tabs for both D6 and D7.

#3

Dave Reid - November 7, 2009 - 18:40

Yeah I think the only change would be this would use $form['#attached']['js'][] = ... instead of drupal_add_js(...).

 
 

Drupal is a registered trademark of Dries Buytaert.