I was trying to create my own quicktabs and suddenly all my JS was borked and I didn't even touched JS

so, after some research it was this property :

Broke down all : $quicktabs['qtid'] = 'latest-highlights';

Fixed all : $quicktabs['qtid'] = 'latesthighlights';

If I have time I will submit a patch, but please investigate

Comments

Pasqualle’s picture

Version: 6.x-3.x-dev » 6.x-2.0-rc3
Priority: Normal » Minor
Status: Active » Needs work

the qtid is used in the js to find the quicktab and dash is used as a separator..

the html id of the quicktab is created as
quicktabs.module line 184

    'id' => 'quicktabs-'. $quicktabs['qtid'],

and read as
quicktabs.js line 16

  var qtid = el.id.split('-')[1];

this could be easily fixed with changing the split to substring

  var qtid = el.id.substring(10); // "quicktabs-"

or it would be better to not use the length of the "quicktabs-" string but find the first dash..

featherbelly’s picture

Hi there,

I am trying to add some tabs programatically, e.g.:


$tabs['images'] = array(
  'title' => t('Images'),
  'type' => 'view',
  'vid' => 'nodehierarchy_children_images',
  'display' => 'default',
  'args' => arg(1),
);

$tabs['text'] = array(
  'title' => t('Text'),
  'type' => 'view',
  'vid' => 'nodehierarchy_children_text',
  'display' => 'default',
  'args' => arg(1),
);

$quicktabs['qtid'] = 'event-tabs';
$quicktabs['tabs'] = $tabs;
$quicktabs['style'] = 'Basic';
$quicktabs['ajax'] = TRUE;
print theme('quicktabs', $quicktabs);

However the AJAX does not seem to work... If I create the QT block manually then it does work. Any idea what I might be doing wrong?

Many thanks.

Pasqualle’s picture

this bug is still not fixed, so try:

$quicktabs['qtid'] = 'eventtabs';

or

$quicktabs['qtid'] = 'event_tabs';
featherbelly’s picture

Many thanks! Now works like a charm...

Pasqualle’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.