You are here

function bat_fullcalendar_set_js_files in Booking and Availability Management Tools for Drupal 7

Sets up JS files for fullcalendar and calls an alter to allow other modules to change them.

Parameters

array $user_js_files:

Return value

array

1 call to bat_fullcalendar_set_js_files()
theme_bat_fullcalendar in modules/bat_fullcalendar/bat_fullcalendar.module
Theme function for FullCalendar.

File

modules/bat_fullcalendar/bat_fullcalendar.module, line 642
Manages the display of FullCalendar and provides ways for other modules to easily modify it.

Code

function bat_fullcalendar_set_js_files($user_js_files = array()) {
  if (count($user_js_files) > 0) {
    $js_files = $user_js_files;
  }
  else {
    $js_files = array(
      drupal_get_path('module', 'bat_fullcalendar') . '/js/bat_fullcalendar_timeline.js',
    );
    if (module_exists('qtip_library')) {
      libraries_load('qtip');
    }
  }

  // Provide alter hook to change calendar js files.
  drupal_alter('bat_fullcalendar_render_js', $js_files);
  return $js_files;
}