Closed (fixed)
Project:
Vertical Tabs
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jun 2009 at 14:43 UTC
Updated:
18 Dec 2009 at 05:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchThis patch seems misplaced. Shouldn't Popups make sure that the Drupal.settings.verticalTabs value has been set? It seems that with the proposed solution Vertical Tabs won't work within the popup.
Comment #2
DeFr commentedThis patch shouldn't change at all how pages with Vertical Tabs within popups react: for them, Drupal.settings.verticalTabs is correctly filled with the fieldsets that should be rendered as vertical tabs in the popups in this case, so we're not hitting the jQuery.each problem. They don't seem to work right though, so that's something I'll have to check too.
The problem this patch attempts to fix though is the following one: if you have a node form that has Vertical Tabs, and a popup linking to something that can't possibly have Vertical Tabs in it, for example a View, then we're in the following situation when attachBehaviors is called on the popup content:
In this case, calling $.each will make the form error out.
I guess an alternative would be to try to make Popups unregister functions from Drupal.behaviors while attaching behaviors on the popup content, but getting the needed one back would imply reinterpreting every JS files really needed by the popup, which doesn't sound all that good.
Comment #3
digi24 commentedThe patch works for me, solved my problem in #575566: Drupal.behaviors.verticalTabsReload when no tabs present.
Comment #4
dave reidHere's the patch I'll be committing to CVS very shortly.
Comment #5
dave reidCommitted to CVS. Thanks!.
http://drupal.org/cvs?commit=297750