function ctools_add_js in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 ctools.module \ctools_add_js()
Include js files as necessary.
This helper function is used by ctools but can also be used in other modules in the same way as explained in the comments of ctools_include.
Parameters
$file: The base file name to be included.
$module: Optional module containing the include.
$dir: Optional subdirectory containing the include file.
13 calls to ctools_add_js()
- ctools_ajax_sample_page in ctools_ajax_sample/
ctools_ajax_sample.module - Page callback to display links and render a container for AJAX stuff.
- ctools_custom_content_type_edit_form in plugins/
content_types/ custom/ custom.inc - Returns an edit form for the custom type.
- ctools_dependent_process in includes/
dependent.inc - Process callback to add dependency to form items.
- ctools_export_ui::list_form in plugins/
export_ui/ ctools_export_ui.class.php - Create the filter/sort form at the top of a list of exports.
- ctools_jump_menu in includes/
jump-menu.inc - Generate a jump menu form.
File
- ./
ctools.module, line 165 - CTools primary module file.
Code
function ctools_add_js($file, $module = 'ctools', $dir = 'js') {
drupal_add_js(drupal_get_path('module', $module) . "/{$dir}/{$file}.js");
}