Vertical tabs li do not have a uniqe identifier, as you see below, so it would be nice to add an extra class or id,
to be able work with js/jquery.

<ul class="vertical-tabs-list">
  <li class="vertical-tab-button" tabindex="-1"><a href="#"><strong>Label n</strong><span class="summary"></span></a></li>
   <!-- repeat n times -->
</ul>
Files: 
CommentFileSizeAuthor
#10 add_extra_class_or_id-2081521-10.patch737 bytesalansaviolobo
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 98,582 pass(es). View
#9 add_extra_class_or_id-2081521-9.patch732 bytesalansaviolobo
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 98,574 pass(es). View
#8 vertical-tabs-li-id-2081521-8.patch663 bytestompagabor
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,809 pass(es). View
#6 2081521-verticaltabs.png91.83 KBtompagabor
#5 vertical-tabs-li-id-2081521-5.patch690 bytesInternetDevels
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,799 pass(es). View

Comments

fl3a’s picture

The corresponding patch.

fl3a’s picture

Title: Add extra class to li.vertical-tab-button » Add extra class or id to li.vertical-tab-button
FileSize
669 bytes

Patch with id instaead of class, perhaps more semantic...

lord4gb’s picture

Great patch! Exactly what I was looking for. First time I've applied a patch as well. Thanks!

nod_’s picture

Version: 7.23 » 8.x-dev

We fix things in D8 first then we backport to D7. Any chance you can try your hand at making a Drupal8 patch?

For what purpose are you using the unique identifier? If it's only for JS-related stuff we tend to go with data- attributes instead of classes.

InternetDevels’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
690 bytes
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,799 pass(es). View

Hi, d8 patch added ;)

tompagabor’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
91.83 KB

Works great!
RTBC?

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Hm. Doesn't look like nod_'s question in #4 was addressed.

tompagabor’s picture

FileSize
663 bytes
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,809 pass(es). View

Is there any refernece, how can use data- attributes in Drupal?
I use data-verticaltabid.

alansaviolobo’s picture

FileSize
732 bytes
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 98,574 pass(es). View

reroll

alansaviolobo’s picture

FileSize
737 bytes
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 98,582 pass(es). View

corrected patch.

droplet’s picture

Status: Needs review » Needs work

I can imagine this is useful in some case, e.g. trigger another tab to active tab. But in core doesn't have such of features. It's make sense if we could refactor current script to rely on the new data-id to provide better development exp.

droplet’s picture

Version: 8.0.x-dev » 8.1.x-dev

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.