fullcalendar/test/actions.html
2009-11-22 16:21:11 -08:00

135 lines
3.1 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='jgrowl/jgrowl.css' />
<script type='text/javascript' src='../jquery/jquery.js'></script>
<script type='text/javascript' src='../jquery/ui.core.js'></script>
<script type='text/javascript' src='../jquery/ui.draggable.js'></script>
<script type='text/javascript' src='../fullcalendar/fullcalendar.js'></script>
<script type='text/javascript' src='jgrowl/jgrowl.js'></script>
<script type='text/javascript'>
$(document).ready(function() {
var d = new Date();
var y = d.getFullYear();
var m = d.getMonth();
$('#calendar').fullCalendar({
monthDisplay: function(year, month, monthTitle) {
$.jGrowl("<b>monthDisplay</b><br />" +
year + "-" + month + "<br />" +
monthTitle);
},
loading: function(bool) {
$.jGrowl("<b>loading</b>: " + bool);
},
resize: function() {
$.jGrowl("<b>resize</b>");
},
dayClick: function(date) {
$.jGrowl("<b>dayClick</b><br />" +
date + "<br />" +
this.nodeName);
},
eventRender: function(event, element) {
if (event.id == 3) {
//return false;
return $("<div style='background:red' />").text(event.title);
}
},
eventClick: function(event, ev) {
$.jGrowl("<b>eventClick</b><br />" +
event.title + "<br />" +
ev.pageX + "," + ev.pageY + "<br />" +
this.nodeName);
//return false;
},
/*eventMouseover: function(event, ev) {
$.jGrowl("<b>eventMouseover</b><br />" +
event.title + "<br />" +
ev.pageX + "," + ev.pageY + "<br />" +
this.nodeName);
},
eventMouseout: function(event, ev) {
$.jGrowl("<b>eventMouseout</b><br />" +
event.title + "<br />" +
ev.pageX + "," + ev.pageY + "<br />" +
this.nodeName);
},*/
eventDragStart: function(event, ev, ui) {
$.jGrowl("<b>eventDragStart</b><br />" +
event.title + "<br />" +
ev.pageX + "," + ev.pageY + "<br />" +
ui);
},
eventDragStop: function(event, ev, ui) {
$.jGrowl("<b>eventDragStop</b><br />" +
event.title + "<br />" +
ev.pageX + "," + ev.pageY + "<br />" +
ui);
},
eventDrop: function(event, delta, ev, ui) {
$.jGrowl("<b>eventDrop</b><br />" +
delta + "<br />" +
event.title + "<br />" +
ev.pageX + "," + ev.pageY + "<br />" +
ui);
},
draggable: true,
events: [
{
id: 1,
title: "Long Event",
start: new Date(y, m, 6, 14, 0),
end: new Date(y, m, 11)
},
{
id: 2,
title: "Repeating Event",
start: new Date(y, m, 2)
},
{
id: 2,
title: "Repeating Event",
start: new Date(y, m, 9)
},
{
id: 3,
title: "Meeting",
start: new Date(y, m, 20, 9, 0)
},
{
id: 4,
title: "Click for Facebook",
start: new Date(y, m, 27, 16),
end: new Date(y, m, 29),
url: "http://facebook.com/"
}
]
});
});
</script>
</head>
<body style='font-size:14px;font-family:Arial'>
<div id='calendar' style='width:75%'></div>
</body>
</html>