function jcalendar_views_pre_view in Calendar 5.2
Same name and namespace in other branches
- 6.2 jcalendar/jcalendar.module \jcalendar_views_pre_view()
Override the calendar view to inject javascript.
Parameters
view Which view we are using.:
Return value
unknown as of yet.
File
- jcalendar/
jcalendar.module, line 65 - jQuery Calendar UI features.
Code
function jcalendar_views_pre_view(&$view) {
if ($view->calendar_display == 'calendar') {
$path = drupal_get_path('module', 'jcalendar');
drupal_add_js('var var_path = ' . drupal_to_js(base_path() . $path) . ";", 'inline');
drupal_add_js('var var_base_path = ' . drupal_to_js(base_path()) . ";", 'inline');
drupal_add_js($path . '/jcalendar.js');
drupal_add_css($path . '/jcalendar.css');
}
}