You are here

function views_refresh_preprocess_views_view in Views Refresh 7

Preprocess the primary theme implementation for a view.

File

./views_refresh.module, line 29
Views Refresh module.

Code

function views_refresh_preprocess_views_view(&$vars) {
  if ($vars['view']->use_ajax) {
    drupal_add_js(drupal_get_path('module', 'views_refresh') . '/views_refresh.js');
    $settings = array(
      'viewsRefresh' => array(
        $vars['view']->dom_id => isset($_GET['page']) ? $_GET['page'] : '',
      ),
    );
    drupal_add_js($settings, 'setting');
  }
}