I have a few quicktabs blocks set up on my site, none are using ajax.
On my pages, the header has each tab escaped as a long string in the Drupal.settings variable.
But there are also 2 div tags with the full tabs in the body of the code, so I would think that the code would just show/hide these divs, and wouldn't need the tab as a variable.

Is it possible to get rid of this long settings variable in the header of the page?

thanks.

Comments

loze’s picture

Version: 6.x-2.x-dev » 6.x-2.0-rc3
pasqualle’s picture

this is used when you load the tab content with ajax.. maybe we can remove it when using non-ajax quicktabs..

loze’s picture

around line 193 in quicktabs.module, I have replaced drupal_add_js(array('quicktabs' => array('qt_'. $quicktabs['qtid'] => $quicktabs)), 'setting');

with

$settings = $quicktabs;
if(!$settings['ajax']){
   foreach($settings['tabs'] as $k=>$v){
      unset($settings['tabs'][$k]['value']);
      unset($settings['tabs'][$k]['text']);
   }
}
drupal_add_js(array('quicktabs' => array('qt_'. $quicktabs['qtid'] => $settings)), 'setting');

and the view code is not included in drupal.settings.

thanks.

pasqualle’s picture

Category: support » bug
Priority: Normal » Minor
Status: Active » Fixed

http://drupal.org/cvs?commit=292432

this change should remove the unnecessary values from Drupal.settings

Status: Fixed » Closed (fixed)

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

pasqualle’s picture

Version: 6.x-2.0-rc3 » 6.x-2.0-rc4
Status: Closed (fixed) » Needs work

this patch needs php 5.2. for array_fill_keys(). That should not be a requirement for QT 6.x

pasqualle’s picture

pasqualle’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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