? 558614-tabs-d7.patch Index: tabs.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/tabs/tabs.admin.inc,v retrieving revision 1.5 diff -u -p -r1.5 tabs.admin.inc --- tabs.admin.inc 18 Jan 2010 06:30:10 -0000 1.5 +++ tabs.admin.inc 2 Dec 2010 23:08:28 -0000 @@ -11,47 +11,55 @@ */ function tabs_admin_settings() { $form = array(); - $form['tabs_slide'] = array( + $form['effects'] = array( + '#type' => 'fieldset', + '#title' => t('Effects'), + ); + $form['effects']['tabs_slide'] = array( '#type' => 'radios', '#title' => t('Slide effect'), '#description' => t('Apply slide effect when changing tabs.'), '#default_value' => variable_get('tabs_slide', 0), '#options' => array(t('disabled'), t('enabled')), ); - $form['tabs_fade'] = array( + $form['effects']['tabs_fade'] = array( '#type' => 'radios', '#title' => t('Fade effect'), '#description' => t('Apply fade effect when changing tabs.'), '#default_value' => variable_get('tabs_fade', 0), '#options' => array(t('disabled'), t('enabled')), ); - $form['tabs_speed'] = array( + $form['effects']['tabs_speed'] = array( '#type' => 'radios', '#title' => t('Effect speed'), '#description' => t('Speed at which to apply effects.'), '#default_value' => variable_get('tabs_speed', 'fast'), '#options' => array('slow' => t('slow'), 'fast' => t('fast'), '1' => t('immediate')), ); - $form['tabs_navigation'] = array( + $form['navigation'] = array( + '#type' => 'fieldset', + '#title' => t('Navigation'), + ); + $form['navigation']['tabs_navigation'] = array( '#type' => 'radios', '#title' => t('Navigation buttons'), '#description' => t('Enable to add "next" and "previous" buttons to the bottom of all tab sets.'), '#default_value' => variable_get('tabs_navigation', 0), '#options' => array(t('disabled'), t('enabled')), ); - $form['tabs_nav_next'] = array( + $form['navigation']['tabs_nav_next'] = array( '#type' => 'textfield', '#title' => t('Next button caption'), '#description' => t('The text to be displayed in the \'next\' button.'), '#default_value' => variable_get('tabs_nav_next', t('next')), ); - $form['tabs_nav_prev'] = array( + $form['navigation']['tabs_nav_prev'] = array( '#type' => 'textfield', '#title' => t('Previous button caption'), '#description' => t('The text to be displayed in the \'previous\' button.'), '#default_value' => variable_get('tabs_nav_prev', t('previous')), ); - $form['tabs_navigation_titles'] = array( + $form['navigation']['tabs_navigation_titles'] = array( '#type' => 'radios', '#title' => t('Take captions from tab titles'), '#description' => t('Enable to use tht titles of the next or previous tabs for "next" and "previous" button captions. If this option is enabled, the next and previous captions above will be ignored.'), @@ -65,6 +73,5 @@ function tabs_admin_settings() { '#default_value' => variable_get('tabs_descriptive_urls', 0), '#options' => array(t('disabled'), t('enabled')), ); - $form = system_settings_form($form); - return $form; + return system_settings_form($form); } Index: tabs.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/tabs/tabs.info,v retrieving revision 1.3 diff -u -p -r1.3 tabs.info --- tabs.info 26 Aug 2009 15:12:08 -0000 1.3 +++ tabs.info 2 Dec 2010 23:08:28 -0000 @@ -1,4 +1,9 @@ ; $Id: tabs.info,v 1.3 2009/08/26 15:12:08 nedjo Exp $ name = Tabs description = A helper module for creating tabbed pages. -core = 6.x +core = 7.x + +files[] = tabs.admin.inc +files[] = tabs.install +files[] = tabs.module +files[] = tabs.theme.inc Index: tabs.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/tabs/tabs.install,v retrieving revision 1.2 diff -u -p -r1.2 tabs.install --- tabs.install 25 Aug 2009 23:33:02 -0000 1.2 +++ tabs.install 2 Dec 2010 23:08:28 -0000 @@ -12,7 +12,7 @@ function tabs_update_1() { * Implementation of hook_uninstall(). */ function tabs_uninstall() { - foreach (array('slide', 'fade', 'speed', 'navigation', 'nav_next', 'nav_previous', 'descriptive_urls') as $type) { - variable_del('tabs_'. $type); - } + foreach (array('slide', 'fade', 'speed', 'navigation', 'nav_next', 'nav_previous', 'descriptive_urls') as $type) { + variable_del('tabs_'. $type); + } } Index: tabs.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/tabs/tabs.module,v retrieving revision 1.30 diff -u -p -r1.30 tabs.module --- tabs.module 25 May 2010 04:56:40 -0000 1.30 +++ tabs.module 2 Dec 2010 23:08:28 -0000 @@ -9,12 +9,12 @@ */ /** - * Implementation of hook_menu(). + * Implements of hook_menu(). */ function tabs_menu() { $items = array(); - $items['admin/settings/tabs'] = array( + $items['admin/config/user-interface/tabs'] = array( 'title' => 'Tabs', 'description' => 'Configuration for tabs', 'page callback' => 'drupal_get_form', @@ -27,16 +27,16 @@ function tabs_menu() { } /** - * Implementation of hook_theme() + * Implements of hook_theme() */ function tabs_theme() { return array( 'tabset' => array( - 'arguments' => array('element' => NULL), + 'render element' => 'element', 'file' => 'tabs.theme.inc', ), 'tabpage' => array( - 'arguments' => array('element' => NULL), + 'render element' => 'element', 'file' => 'tabs.theme.inc', ), ); @@ -51,26 +51,24 @@ function tabs_pre_render_tabset($element tabs_load(); // Assign a name, reading from the first parent (the key of this tabset element). - $name = $element['#tabset_name'] = form_clean_id(isset($element['#tabset_name']) && $element['#tabset_name'] ? $element['#tabset_name'] : (isset($element['#parents']) && count($element['#parents']) ? $element['#parents'][0] : 'tabset')); + $name = $element['#tabset_name'] = drupal_clean_css_identifier(isset($element['#tabset_name']) && $element['#tabset_name'] ? $element['#tabset_name'] : (isset($element['#parents']) && count($element['#parents']) ? $element['#parents'][0] : 'tabset')); // Add class. if (!isset($element['#attributes'])) { $element['#attributes'] = array(); } - $element['#attributes']['class'] = (isset($element['#attributes']['class']) ? $element['#attributes']['class'] .' ' : '') .'drupal-tabs js-hide'. (isset($element['#tabs_navigation']) && $element['#tabs_navigation'] ? ' tabs-navigation' : ''); + $element['#attributes']['class'] = (isset($element['#attributes']['class']) ? $element['#attributes']['class'] . ' ' : '') . 'drupal-tabs js-hide' . (isset($element['#tabs_navigation']) && $element['#tabs_navigation'] ? ' tabs-navigation' : ''); // Allow other modules to alter the tabset before further processing. drupal_alter('tabs', $element); - $children = element_children($element); - - foreach ($children as $index => $key) { + foreach (element_children($element) as $index => $key) { if (isset($element[$key]['#type']) && $element[$key]['#type'] == 'tabpage') { if (!isset($element[$key]['#content'])) { $element[$key]['#content'] = ''; } if (isset($element[$key]['#description']) && $element[$key]['#description']) { - $element[$key]['#content'] = '