Backport to Drupal 5.x
ckng - August 16, 2008 - 18:02
| Project: | Vertical Tabs |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | needs work |
Description
I've backported it to Drupal 5, see attached.
Using JQuery Update 5.x-2.0, have not tested with default jquery comes with D5
Changes:
- removed Drupal.t() call (not in D5)
- removed collapsible classes using JS instead of #post_render (not in D5)
- CSS to remove tab focus outline
| Attachment | Size |
|---|---|
| vertical-tabs-drupal5-backport.patch | 7.6 KB |

#1
I have made quite a few changes, so please update.
I would prefer that you copy Drupal.t (with modifications), Drupal.checkPlain, and Drupal.formatPlural (with modifications) from Drupal 6, so the difference between the two versions becomes smaller.
#2
Considering the amount of work needed to get this in drupal seven I think efforts are not well spent backporting this. nodeform module is stable and provides the most important functionality of this module (vertical tabs on node forms) and would likely be easier to backport.
Having said that, this is open source, so scratch your own itch! :)
#3
I believe the new vertical_tabs_menu_alter cannot be ported.
I'll leave that portion out unless someone know of a way to do it in D5.
#4
updated patch
- copied from D6 Drupal.t (mod), Drupal.checkPlain, and Drupal.formatPlural (mod) into vertical_tabs.node_form.js
- removed admin settings Main Configuration (see comment #3 above)
- changed js to work with D5
- removed collapsible classes using JS instead of #post_render (not in D5)
- included #298971: Fieldset's legend not hidden
#5
This isn't working for me, tested on 2 sites..
#6
I believe you need to install jquery_update 2.x for it to work. Because all my sites are using it. Have not tested without it.
Please test and let us know, I will add the dependency.
#7
JQuery Interface Library 5.x-1.0
jQuery Update 5.x-2.0
^ are both installed and enabled on at least one of the sites I tested it on
Would my theme make any difference? I'm using Marinelli
#8
Just tested with a clean install and tested the dependencies.
Use the latest patch.
- Only dependency is JS Tools.
- Do not need jQuery Update and JQuery Interface
- Fixed a html formating when preview is required
#9
It's working now, but the display css still needs some work.. that could be related to my theme though.. about to test on another site
Edit: After testing on another site display appears to be variable based on template but some additions to the CSS could still be useful..
Here is my current version..
.vertical-tabs-list .description {
display: block;
}
/* Border style of tabs and content */
div.vertical-tabs-div,
ul.vertical-tabs-list {
border: 1px solid #D9EAF5;
list-style:none;
padding-left:0;
}
/* Make space for the tabs on the side */
.vertical-tabs {
margin-left: 180px;
}
/* Set the background image on the tabs and content */
.vertical-tabs,
.vertical-tabs ul.vertical-tabs-list {
background: #fff url(gradient-inner.png) repeat-x top;
}
/* Position and layout of tabs container */
.vertical-tabs ul.vertical-tabs-list {
width: 179px;
float: left;
margin: 0 0 0 -181px;
border-right: 0px;
z-index: 1;
border-bottom: 0;
}
/* Reset LIs which probably have awkward layout inherited from tabs */
.vertical-tabs ul.vertical-tabs-list li {
float: none;
margin: 0;
padding: 0;
background-image: none;
}
/* Layout of each tab */
.vertical-tabs ul.vertical-tabs-list a {
display: block;
margin: 0;
padding: .4em .3em .1em .6em;
background: #EDF5FA;
text-align: left;
font-weight: normal;
border-bottom: 1px solid #D9EAF5;
}
.vertical-tabs ul.vertical-tabs-list a.vertical-tabs-nodescription {
padding-bottom: .4em;
}
.vertical-tabs ul.vertical-tabs-list .description {
padding: 0;
line-height: normal;
min-height: 0;
white-space: normal;
}
.vertical-tabs ul.vertical-tabs-list a {
border-right: 1px solid #D9EAF5;
text-decoration: none;
}
/* Hover state of tabs */
.vertical-tabs ul.vertical-tabs-list a:hover {
color: #0062A0;
text-decoration: none;
cursor: pointer;
}
.vertical-tabs ul.vertical-tabs-list a:focus {
outline: none;
text-decoration: none;
}
/* Selected tab */
.vertical-tabs ul.vertical-tabs-list li.selected a {
background: transparent none;
color: black;
border-right: 0;
}
/* Reset some important elements of each panel */
.vertical-tabs .vertical-tabs-div {
margin: 0;
padding: .5em;
margin-top: -1px;
margin-left: -1px;
background: transparent none;
}
.buttons {
clear: both;
}
#edit-book-bid-wrapper .description {
clear:none;
}
.vertical-tabs .description {
color:#898989;
font-size:0.9em;
}
#10
subscribe
#11
subscribe
#12
I've been trying to use the patches with the current version of vertical tabs (6.x-1.x-dev), but the sections of the original to be replaced don't exist. Has vertical tabs been updated so that the patches are no longer appropriate for the current version?
Thanks.
#13
Could you make available all the modified files that you're using? The current release of Vertical Tabs has been updated since the patches were written, so the patches can't be applied to the newer files.
Thanks
RWW
#14
I'm fine with providing a backport if these patches are updated. Try to keep changes minimal to provide ease of maintenance.
#15
subscribing
#16
subscribing
#17
subscribing
#18
subscribing
#19
subscribing
#20
subscribing, and I think this should go back to normal priority - I would so much like this in my 5.x site!
#21
If you really want to get this backported, make sure to keep the patches up to date.
Attached is a new patch to get things rolling again, no way near committable yet, but it does somewhat work.
Cheers,
Deciphered.
#22
Updated patch.
Should now be good for review, fixed all issues I was aware of from the last patch.
Only bugs that I have noticed are also visible in D6 versions.
#23
TODO: Fix support for Garland/Color module.
#24
Hey Deciphered,
Thanks so much for updating this. I patched the latest 6.1-dev version, installed it on a latest D5 site, and get the following whenever visiting a node-type page:
* warning: include_once(modules/node/node.pages.inc) [function.include-once]: failed to open stream: No such file or directory in /var/www/thomas/lc3/sites/all/modules/vertical_tabs/vertical_tabs.module on line 111.* warning: include_once() [function.include]: Failed opening 'modules/node/node.pages.inc' for inclusion (include_path='.:/usr/share/php:/usr/share/pear:/var/www/thomas/lc3/sites/all/modules/activitystream/activitystream_flickr/PEAR') in /var/www/thomas/lc3/sites/all/modules/vertical_tabs/vertical_tabs.module on line 111.
* warning: uasort() [function.uasort]: Invalid comparison function. in /var/www/thomas/lc3/sites/all/modules/vertical_tabs/vertical_tabs.module on line 127.
Seems to work fine regardless of this message.
#25
Sorry for not updating this. No longer having any D5 sites.
#26
@pribeh
Thanks for the feedback. I really should have the development build of Drupal 5 running so I get those errors as well, will install it shortly.
The issue has, or should have, been fixed in this latest patch.
Also in this latest patch is some initial work towards the garland/color stuff, but still needs work.
Cheers,
Deciphered.
#27
Expect updated patch within the next couple of days.
#28
Thanks Deciphered, after doing the D7 backport of CSS I think there'll be less overall changes needed before a final release. It'll be great to have another review of the latest CVS code before making a new beta. Thanks!
#29
#30
Hi, I applied the latest patch but all I get at the bottom page is "[object Object]" in a fieldset
Thanks