1.20.x views.module | views_add_js($file) |
Include views .js files.
File
- modules/
views/ views.module, line 1015 - Primarily Backdrop hooks and global API functions to manipulate views.
Code
function views_add_js($file) {
static $base = TRUE, $ajax = TRUE;
if ($base) {
backdrop_add_js(backdrop_get_path('module', 'views') . "/js/base.js");
$base = FALSE;
}
if ($ajax && in_array($file, array('ajax', 'ajax_view'))) {
backdrop_add_library('system', 'backdrop.ajax');
backdrop_add_library('system', 'jquery.form');
$ajax = FALSE;
}
backdrop_add_js(backdrop_get_path('module', 'views') . "/js/$file.js");
}