The way the menu function for the tabs module is designed causes all the javascript associated with the tabs to load on every page in the application when the module is activated, regardless of whether or not tabs are being used on the current page. This leads to additional files for users to have to download, needless page rendering time, and more.

The tabs_load call in the menu hook should be moved into the function that actually displays the tabs. This is the code that does it:

function tabs_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/settings/tabs',
'title' => t('Tabs'),
'description' => t('Configuration for tabs'),
'callback' => 'drupal_get_form',
'callback arguments' => array('tabs_admin_settings')
);
}
else {
tabs_load();
}
return $items;
}

Comments

nedjo’s picture

Category: bug » task

Agreed, I'd welcome a patch.

wim leers’s picture

Assigned: Unassigned » wim leers
wim leers’s picture

Status: Active » Closed (won't fix)

The Drupal 5 version of this module is no longer maintained.