mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-09-10 12:00:15 +08:00
locked down examples/tests for 1.4, some minor bugfixes
This commit is contained in:
+40
-42
@@ -4,17 +4,19 @@
|
||||
<script type='text/javascript' src='loader.js'></script>
|
||||
<script type='text/javascript'>
|
||||
|
||||
var cal;
|
||||
var d = new Date();
|
||||
var y = d.getFullYear();
|
||||
var m = d.getMonth();
|
||||
var cal, staticEvents;
|
||||
|
||||
var staticEvents;
|
||||
var date = new Date();
|
||||
var d = date.getDate();
|
||||
var m = date.getMonth();
|
||||
var y = date.getFullYear();
|
||||
|
||||
$(document).ready(function() {
|
||||
cal = $('#calendar').fullCalendar({
|
||||
editable: true,
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
|
||||
},
|
||||
loading: function(bool) {
|
||||
@@ -26,60 +28,56 @@
|
||||
},
|
||||
events: staticEvents = [
|
||||
{
|
||||
id: 1,
|
||||
title: "Long Event",
|
||||
start: new Date(y, m, 6),
|
||||
end: new Date(y, m, 10)
|
||||
title: 'All Day Event',
|
||||
start: new Date(y, m, 1)
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "Repeating",
|
||||
start: new Date(y, m, 2)
|
||||
title: 'Long Event',
|
||||
start: new Date(y, m, d-5),
|
||||
end: new Date(y, m, d-2)
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "Repeating",
|
||||
start: new Date(y, m, 9)
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: "Meeting",
|
||||
start: new Date(y, m, 20, 9, 0),
|
||||
end: new Date(y, m, 21, 0, 0),
|
||||
id: 999,
|
||||
title: 'Repeating Event',
|
||||
start: new Date(y, m, d-3, 16, 0),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: "Click for Facebook",
|
||||
start: new Date(y, m, 27),
|
||||
end: new Date(y, m, 28),
|
||||
url: "http://facebook.com/"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: "timed event1",
|
||||
start: new Date (y, m, 31, 17, 30),
|
||||
id: 999,
|
||||
title: 'Repeating Event',
|
||||
start: new Date(y, m, d+4, 16, 0),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
title: "timed event1",
|
||||
start: new Date (y, m+1, 2, 14, 15),
|
||||
title: 'Meeting',
|
||||
start: new Date(y, m, d, 10, 30),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
title: "timed event1",
|
||||
start: new Date (y, m+1, 4, 15, 00),
|
||||
end: new Date(y, m+1, 4, 17, 00),
|
||||
id: 777,
|
||||
title: 'Lunch',
|
||||
start: new Date(y, m, d, 12, 0),
|
||||
end: new Date(y, m, d, 14, 0),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
title: 'Birthday Party',
|
||||
start: new Date(y, m, d+1, 19, 0),
|
||||
end: new Date(y, m, d+1, 22, 30),
|
||||
allDay: false
|
||||
},
|
||||
{
|
||||
title: 'Click for Google',
|
||||
start: new Date(y, m, 28),
|
||||
end: new Date(y, m, 29),
|
||||
url: 'http://google.com/'
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
function updateEventStart() {
|
||||
var event = cal.fullCalendar('clientEvents', 3)[0];
|
||||
var event = cal.fullCalendar('clientEvents', 777)[0];
|
||||
event.start = new Date(y, m, 25, 10, 30);
|
||||
event.end = new Date(y, m, 26);
|
||||
//event.allDay = true;
|
||||
@@ -87,7 +85,7 @@
|
||||
}
|
||||
|
||||
function updateRepeatingEvent() {
|
||||
var event = cal.fullCalendar('clientEvents', 2)[0];
|
||||
var event = cal.fullCalendar('clientEvents', 999)[0];
|
||||
event.start = new Date(y, m, 4, 13, 30);
|
||||
event.end = new Date(y, m, 5, 2, 0);
|
||||
event.allDay = false;
|
||||
@@ -136,10 +134,10 @@
|
||||
<br />
|
||||
|
||||
<button onclick="cal.fullCalendar('removeEvents')">remove all</button>
|
||||
<button onclick="cal.fullCalendar('removeEvents', 2)">remove repeating events</button>
|
||||
<button onclick="cal.fullCalendar('removeEvents', 999)">remove repeating events</button>
|
||||
<button onclick="cal.fullCalendar('removeEvents', function(e){return !e.allDay})">remove timed events</button>
|
||||
<button onclick="console.log(cal.fullCalendar('clientEvents'))">log events</button>
|
||||
<button onclick="console.log(cal.fullCalendar('clientEvents', '2'))">log repeating events</button>
|
||||
<button onclick="console.log(cal.fullCalendar('clientEvents', '999'))">log repeating events</button>
|
||||
<button onclick="console.log(cal.fullCalendar('clientEvents', function(e){return e.allDay}))">log all-day events</button>
|
||||
<br />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user