Closed (duplicate)
Project:
Vertical Tabs
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 May 2009 at 02:45 UTC
Updated:
1 Nov 2009 at 20:22 UTC
Hi,
While working with vertical tabs I noticed that there is a variable being set called 'weight', but I also noticed that this variable is not being referenced or respected by 'vertical_tabs.js'.
Attached is a patch to that both references and respects the tabs weight settings.
Admittedly I am no jQuery wizard, and the code could probably be optimized in a big way, it does currently work.
Cheers,
Deciphered.
| Comment | File | Size | Author |
|---|---|---|---|
| vertical_tabs-DRUPAL-6--1--tabs_weight-1.patch | 1.48 KB | deciphered |
Comments
Comment #1
decipheredOk, while it does technically work, the sorting is not perfect.
It will consider 5 > 40 > 3.
Comment #2
quicksketchAs per #444378: Fields re-ordered by CCK do not have the right weight in Vertical Tabs, Vertical Tabs should already obey the order of the original fieldsets, so reordering them with JavaScript should not be necessary. If this isn't the case it's definitely unintended behavior.
Comment #3
decipheredHi Quicksketch,
The reason I wanted this functionality is that I am adding fieldsets/tabs to my vertical tabs field dynamically using an AHAH callback and the new fieldsets/tabs are ending up as the last items in the list.
I haven't whether adding the new fieldset in a weighted position will also solve this, so I will do that and report back.
Cheers,
Deciphered.
Comment #4
dww#444378: Fields re-ordered by CCK do not have the right weight in Vertical Tabs