You are here

function responsive_tables_preprocess_views_view in Responsive Tables 7

Implements hook_preprocess_views_view().

File

./responsive_tables.module, line 36
Describe the file

Code

function responsive_tables_preprocess_views_view(&$vars) {
  if (isset($vars['view']->style_plugin->options['responsify']) && $vars['view']->style_plugin->options['responsify'] == TRUE) {
    drupal_add_library('responsive_tables', 'responsive_tables');
    drupal_add_js('jQuery(document).ready(function() { jQuery(".view-dom-id-' . $vars['view']->dom_id . ' table").mediaTable(); });', array(
      'type' => 'inline',
    ));
  }
}