forked from kthornbloom/Monthly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event-tests.html
135 lines (133 loc) · 2.69 KB
/
event-tests.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
128
129
130
131
132
133
134
135
<!doctype html>
<html lang="en">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, user-scalable=0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset='utf-8'>
<head>
<title>Monthly - Event Tests</title>
<link rel="stylesheet" href="css/monthly.css">
<style type="text/css">
body {
font-family: Calibri;
background-color: #f0f0f0;
padding: 0em 1em;
}
#mycalendar {
width: 100%;
margin: 2em auto 0 auto;
max-width: 80em;
border: 1px solid #666;
}
</style>
</head>
<body>
<h1>Monthly.js Event Tests</h1>
<h2>October - December 2016</h2>
<p>This contains events intended to test basic event span functionality of monthly.js</p>
<div class="monthly" id="mycalendar"></div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/monthly.js"></script>
<script type="text/javascript">
var sampleEvents = {
"monthly": [
{
"id": 1,
"name": "Whole month event",
"startdate": "2016-10-01",
"enddate": "2016-10-31",
"starttime": "12:00",
"endtime": "2:00",
"color": "#99CCCC",
"url": ""
},
{
"id": 2,
"name": "Test encompasses month",
"startdate": "2016-10-29",
"enddate": "2016-12-02",
"starttime": "12:00",
"endtime": "2:00",
"color": "#CC99CC",
"url": ""
},
{
"id": 3,
"name": "Test single day",
"startdate": "2016-11-04",
"enddate": "",
"starttime": "",
"endtime": "",
"color": "#666699",
"url": "https://www.google.com/"
},
{
"id": 8,
"name": "Test single day",
"startdate": "2016-11-05",
"enddate": "",
"starttime": "",
"endtime": "",
"color": "#666699",
"url": "https://www.google.com/"
},
{
"id": 4,
"name": "Test single day with time",
"startdate": "2016-11-07",
"enddate": "",
"starttime": "12:00",
"endtime": "02:00",
"color": "#996666",
"url": ""
},
{
"id": 5,
"name": "Test splits month",
"startdate": "2016-11-25",
"enddate": "2016-12-04",
"starttime": "",
"endtime": "",
"color": "#999999",
"url": ""
},
{
"id": 6,
"name": "Test events on same day",
"startdate": "2016-11-25",
"enddate": "",
"starttime": "",
"endtime": "",
"color": "#99CC99",
"url": ""
},
{
"id": 7,
"name": "Test events on same day",
"startdate": "2016-11-25",
"enddate": "",
"starttime": "",
"endtime": "",
"color": "#669966",
"url": ""
},
{
"id": 9,
"name": "Test events on same day",
"startdate": "2016-11-25",
"enddate": "",
"starttime": "",
"endtime": "",
"color": "#999966",
"url": ""
}
]
};
$(window).load( function() {
$('#mycalendar').monthly({
mode: 'event',
dataType: 'json',
events: sampleEvents
});
});
</script>
</body></html>