function ctools_add_js

cis7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
cle7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
elmsmedia7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
icor7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
meedjum_blog7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
mooc7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = '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.


$file: The base file name to be included.

$module: Optional module containing the include.

$dir: Optional subdirectory containing the include file.

21 calls to ctools_add_js()
ctools_ajax_command_attr in sites/all/modules/ulmus/ctools/includes/
Set a single property to a value, on all matched elements.
ctools_ajax_command_redirect in sites/all/modules/ulmus/ctools/includes/
Force a client-side redirect.
ctools_ajax_command_reload in sites/all/modules/ulmus/ctools/includes/
Force a reload of the current page.
ctools_ajax_command_submit in sites/all/modules/ulmus/ctools/includes/
Submit a form.
ctools_ajax_sample_login_success in sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module
Post-login processor: should we go to the user account or stay in place?

... See full list


sites/all/modules/ulmus/ctools/ctools.module, line 218
CTools primary module file.


function ctools_add_js($file, $module = 'ctools', $dir = 'js') {
  drupal_add_js(drupal_get_path('module', $module) . "/$dir/$file.js");