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

AttachmentSize
vertical-tabs-drupal5-backport.patch7.6 KB

#1

dmitrig01 - August 17, 2008 - 05:41
Version:<none>» 6.x-1.x-dev
Status:needs review» needs work

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

Bevan - August 21, 2008 - 01:48
Priority:normal» minor

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

ckng - August 23, 2008 - 09:50

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

ckng - August 24, 2008 - 04:44

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

AttachmentSize
vertical-tabs-D5-1.patch 9.86 KB

#5

realityloop - September 19, 2008 - 05:26

This isn't working for me, tested on 2 sites..

#6

ckng - September 20, 2008 - 04:42

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

realityloop - September 21, 2008 - 22:36

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

ckng - September 22, 2008 - 04:03
Status:needs work» needs review

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

AttachmentSize
vertical-tabs-D5-2.patch 8.78 KB

#9

realityloop - September 22, 2008 - 04:56

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;
}

AttachmentSize
vert-tabs-D5-2patch.png 16.4 KB

#10

andypost - September 28, 2008 - 13:51

subscribe

#11

dropchew - October 13, 2008 - 13:25

subscribe

#12

RWWood - November 14, 2008 - 02:43

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

RWWood - December 3, 2008 - 23:47

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

quicksketch - December 16, 2008 - 06:44
Status:needs review» needs work

I'm fine with providing a backport if these patches are updated. Try to keep changes minimal to provide ease of maintenance.

#15

ahkiam - January 2, 2009 - 12:13

subscribing

#16

SocialNicheGuru - January 11, 2009 - 00:32

subscribing

#17

designar - March 11, 2009 - 10:23

subscribing

#18

kansaj - March 17, 2009 - 13:24

subscribing

#19

pribeh - April 5, 2009 - 18:53

subscribing

#20

PawelPohl - April 13, 2009 - 02:03

subscribing, and I think this should go back to normal priority - I would so much like this in my 5.x site!

#21

Deciphered - May 4, 2009 - 23:46

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.

AttachmentSize
vertical_tabs-DRUPAL-6--1-296148-backport_D5-3.patch 3.41 KB

#22

Deciphered - May 5, 2009 - 01:36
Status:needs work» needs review

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.

AttachmentSize
vertical_tabs-DRUPAL-6--1-296148-backport_D5-4.patch 7.34 KB

#23

Deciphered - May 5, 2009 - 02:13
Status:needs review» needs work

TODO: Fix support for Garland/Color module.

#24

pribeh - May 5, 2009 - 16:21

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

ckng - May 5, 2009 - 16:18

Sorry for not updating this. No longer having any D5 sites.

#26

Deciphered - May 5, 2009 - 23:04

@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.

AttachmentSize
vertical_tabs-DRUPAL-6--1-296148-backport_D5-5.patch 9.6 KB

#27

Deciphered - May 19, 2009 - 02:51

Expect updated patch within the next couple of days.

#28

quicksketch - May 19, 2009 - 03:33

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

Deciphered - May 19, 2009 - 23:38

#30

droid19 - July 18, 2009 - 13:15

Hi, I applied the latest patch but all I get at the bottom page is "[object Object]" in a fieldset
Thanks

AttachmentSize
object.PNG 3.92 KB
 
 

Drupal is a registered trademark of Dries Buytaert.