views_add_js

6 views.module views_add_js($file)
7 views.module views_add_js($file)

Include views .js files.

6 calls to views_add_js()

File

./views.module, line 790
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_add_js($file) {
  // If javascript has been disabled by the user, never add js files.
  if (variable_get('views_no_javascript', FALSE)) {
    return;
  }

  static $base = TRUE;
  if ($base) {
    drupal_add_js(drupal_get_path('module', 'views') . "/js/base.js");
    $base = FALSE;
  }
  drupal_add_js(drupal_get_path('module', 'views') . "/js/$file.js");
}
Login or register to post comments