-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
127 lines (121 loc) · 3.16 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<html>
<head>
<title>scheduleJS</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.js"></script>
<script src="schedule.js"></script>
<link href="schedule.css" rel="stylesheet" />
<style>
body {
font-family: Helvetica;
}
</style>
<script>
var events;
events = [{
day: new Date("2012-10-01"),
label: function() { return "Custom <em>monday</em> label – " + this.day.getDate() + "/" + this.day.getMonth()},
list: [{
title: "English",
description: "Speak the language",
start: "10:00",
end: "12:00"
}, {
title: "Math",
description: "Learn about numbers ad infinitum",
start: "13:45",
end: "14:45"
}, {
title: "Math",
description: "What is a sine wave really?",
start: "14:30",
end: "15:00"
}, {
title: "Geometry",
description: "Spheres spheres spheres. And spirals.",
start: "15:30",
end: "17:00"
}]
},
{
day: new Date("2012-10-02"),
list: [{
title: "History",
description: "This is only his story.",
start: "08:00",
end: "09:20"
}, {
title: "Math",
description: "See you at noon.",
start: "12:45",
end: "14:00"
}, {
title: "Philosophy",
description: "Get inspired. Think for yourself.",
start: "16:30",
end: "17:00"
}]
},
{
day: new Date("2012-10-03"),
list:[{
title: "Religion",
description: "Search within.",
start: "08:00",
end: "09:20"
}, {
title: "Psychology",
description: "All is mind.",
start: "13:30",
end: "17:00"
}]
},
{
day: new Date("2012-10-04"),
list: [{
title: "History",
description: false,
start: "08:10",
end: "09:20"
}, {
title: "P.E",
description: "Work yo' body.",
start: "16:30",
end: "17:00"
}]
},
{
day: new Date("2012-10-05"),
list: [{
title: "Arts",
description: "Put yourself on paper",
start: "08:00",
end: "09:20"
}, {
title: "Music",
description: "The universal language",
start: "11:45",
end: "14:00"
}, {
title: "Science",
description: "Study yourself",
start: "16:30",
end: "17:00"
}]
}]
$(document).ready(function() {
var $schedule = $("#schedule").scheduler({
events: events
});
$("body").on("click", ".btn-change-view", function() {
var view = ($(this).data("view") == "week" ? "day" : "week")
$(this).data("view", view)
$schedule.scheduler("setViewLayout", view)
});
});
</script>
</head>
<body>
<button class=btn-change-view>Switch view</button>
<div id="schedule"></div>
</body>
</html>