Hi there,
I have created a module that make use of fullcalendar:
function trip_creator_menu(){
$items = array();
$items['potato'] = array(
'title' => 'Potato',
'page callback' => '_first_page',
'access callback' => TRUE,
'expanded' => TRUE,
);
return $items;
}
function _trip_creator_first_page(){
$markup .= '
';
$options['dom_id'] = ".fullcalendar";
$settings = array('dropable' => true,
....
'drop' => '');//i want to attach a function here
drupal_add_js(array('fullcalendar' => $settings), 'setting');
drupal_add_js(drupal_get_path('module', 'fullcalendar') . '/js/fullcalendar.views.js');
drupal_add_js(drupal_get_path('module', 'potato') . '/js/potato.js');
return $markup;
}
My questions are,
1. is there any better way to show a div element on the page to user? For example, I see there is ajax form api in drupal here: http://api.drupal.org/api/drupal/includes--ajax.inc/group/ajax that create a simple ajax-enabled select element. But what I am doing now is just return the html code to the page directly and create all the necessary javascript in the file potato.js to control the element, which I did not make use of drupal to manage stuff of my site.