| 1 |
<?php |
<?php |
| 2 |
// $Id: tabs.module,v 1.9.2.16 2008/06/19 23:03:38 nedjo Exp $ |
// $Id: tabs.module,v 1.9.2.17 2008/11/07 00:47:22 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( |
$form['jstools_history_remote'] = array( |
| 35 |
'#type' => 'radios', |
'#type' => 'radios', |
| 36 |
'#title' => t('History plugin'), |
'#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.'), |
'#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. Note that disabling this setting will affect other modules if you use them: Active Search and Dynamicload.'), |
| 38 |
'#default_value' => variable_get('tabs_history_remote', 0), |
'#default_value' => variable_get('jstools_history_remote', 0), |
| 39 |
'#options' => array(t('disabled'), t('enabled')), |
'#options' => array(t('disabled'), t('enabled')), |
| 40 |
); |
); |
| 41 |
$form['tabs_slide'] = array( |
$form['tabs_slide'] = array( |
| 179 |
$path . '/tabs.js', |
$path . '/tabs.js', |
| 180 |
) |
) |
| 181 |
); |
); |
| 182 |
if (variable_get('tabs_history_remote', 0)) { |
if (variable_get('jstools_history_remote', 0)) { |
| 183 |
drupal_add_js(drupal_get_path('module', 'jstools') . '/jquery.history_remote.pack.js'); |
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'); |