You are here

function tablesorter_init in Tablesorter 7.2

Implements hook_init().

File

./tablesorter.module, line 71
tablesorter.

Code

function tablesorter_init() {
  $path = libraries_get_path('tablesorter');
  drupal_add_js($path . '/jquery.tablesorter.min.js');
  $theme = variable_get('tablesorter_theme', 'system');
  $options = array(
    'type' => 'file',
    'group' => CSS_DEFAULT,
    'basename' => 'tablesortertheme.css',
  );
  switch ($theme) {
    case 'blue':
      drupal_add_css($path . '/themes/blue/style.css', $options);
      break;
    case 'green':
      drupal_add_css($path . '/themes/green/style.css', $options);
      break;
  }
}