Posted by ju on September 15, 2010 at 1:49pm
1 follower
| Project: | Tabs (jQuery UI tabs) |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
If you put ajax tab before preloaded tabs,
preloaded tabs won't work properly (tab content won't be shown).
To fix you have to change theme_tabpage function
(don't add div if tab is ajax loaded):
The correct function:
<?php
function theme_tabpage($element) {
$output = '';
// Ensure the tab has content before rendering it.
if (!empty($element['#content']) || !empty($element['#children'])) {
$output .= '<div id="' . $element['#tab_name'] . '" class="tabs-' . $element['#tabset_name'] . '">';
$output .= '<h2 class="drupal-tabs-title js-hide">'. $element['#title'] .'</h2>';
$output .= $element['#content'] . (!empty($element['#children']) ? $element['#children'] : '');
$output .='</div>';
}
return $output;
}
?>