| 1 |
<?php |
<?php |
| 2 |
// $Id: tabs.module,v 1.9.2.15 2008/03/29 13:37:28 nedjo Exp $ |
// $Id: tabs.module,v 1.9.2.16 2008/06/19 23:03:38 nedjo Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 31 |
*/ |
*/ |
| 32 |
function tabs_admin_settings() { |
function tabs_admin_settings() { |
| 33 |
$form = array(); |
$form = array(); |
| 34 |
|
$form['tabs_history_remote'] = array( |
| 35 |
|
'#type' => 'radios', |
| 36 |
|
'#title' => t('History plugin'), |
| 37 |
|
'#description' => t('Load the history-remote plugin, which ties tab switching to browser back and forward buttons. The plugin can cause errors in combination with certain other Javascript functionality. Disable to avoid such errors.'), |
| 38 |
|
'#default_value' => variable_get('tabs_history_remote', 0), |
| 39 |
|
'#options' => array(t('disabled'), t('enabled')), |
| 40 |
|
); |
| 41 |
$form['tabs_slide'] = array( |
$form['tabs_slide'] = array( |
| 42 |
'#type' => 'radios', |
'#type' => 'radios', |
| 43 |
'#title' => t('Slide effect'), |
'#title' => t('Slide effect'), |
| 176 |
jstools_add_js( |
jstools_add_js( |
| 177 |
array( |
array( |
| 178 |
$path . '/jquery.tabs.pack.js', |
$path . '/jquery.tabs.pack.js', |
|
drupal_get_path('module', 'jstools') . '/jquery.history_remote.pack.js', |
|
| 179 |
$path . '/tabs.js', |
$path . '/tabs.js', |
| 180 |
) |
) |
| 181 |
); |
); |
| 182 |
|
if (variable_get('tabs_history_remote', 0)) { |
| 183 |
|
drupal_add_js(drupal_get_path('module', 'jstools') . '/jquery.history_remote.pack.js'); |
| 184 |
|
} |
| 185 |
drupal_add_js(array('tabs' => array('slide' => (bool) variable_get('tabs_slide', 0), 'fade' => (bool) variable_get('tabs_fade', 0), 'speed' => variable_get('tabs_speed', 'slow'), 'auto_height' => (bool) variable_get('tabs_auto_height', 0), 'next_text' => variable_get('tabs_nav_next', t('next')), 'previous_text' => variable_get('tabs_nav_prev', t('previous')))), 'setting'); |
drupal_add_js(array('tabs' => array('slide' => (bool) variable_get('tabs_slide', 0), 'fade' => (bool) variable_get('tabs_fade', 0), 'speed' => variable_get('tabs_speed', 'slow'), 'auto_height' => (bool) variable_get('tabs_auto_height', 0), 'next_text' => variable_get('tabs_nav_next', t('next')), 'previous_text' => variable_get('tabs_nav_prev', t('previous')))), 'setting'); |
| 186 |
drupal_add_css($path . '/drupal-tabs.css'); |
drupal_add_css($path . '/drupal-tabs.css'); |
| 187 |
drupal_add_css($path . '/tabs.css'); |
drupal_add_css($path . '/tabs.css'); |