forked from MikeSmithDev/FullCalModal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
194 lines (190 loc) · 10.1 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Extend FullCalendar Events with Bootstrap Modal</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.1/fullcalendar.min.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>FullCalendar Events with Bootstrap Modal</h1>
<p>from <a href="http://www.mikesmithdev.com/blog/fullcalendar-event-details-with-bootstrap-modal/" target="_blank">http://www.mikesmithdev.com/blog/fullcalendar-event-details-with-bootstrap-modal/</a></p>
<br />
<div id="bootstrapModalFullCalendar"></div>
</div>
</div>
</div>
<div id="fullCalModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span> <span class="sr-only">close</span></button>
<h4 id="modalTitle" class="modal-title"></h4>
</div>
<div id="modalBody" class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<a class="btn btn-primary" id="eventUrl" target="_blank">Event Page</a>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.2/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.1/fullcalendar.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script>
$(document).ready(function() {
$('#bootstrapModalFullCalendar').fullCalendar({
header: {
left: '',
center: 'prev title next',
right: ''
},
eventClick: function(event, jsEvent, view) {
$('#modalTitle').html(event.title);
$('#modalBody').html(event.description);
$('#eventUrl').attr('href',event.url);
$('#fullCalModal').modal();
return false;
},
events:
[
{
"title":"Free Pizza",
"allday":"false",
"description":"<p>This is just a fake description for the Free Pizza.</p><p>Nothing to see!</p>",
"start":moment().subtract('days',14),
"end":moment().subtract('days',14),
"url":"http://www.mikesmithdev.com/blog/coding-without-music-vs-coding-with-music/"
},
{
"title":"DNUG Meeting",
"allday":"false",
"description":"<p>This is just a fake description for the DNUG Meeting.</p><p>Nothing to see!</p>",
"start":moment().subtract('days',10),
"end":moment().subtract('days',10),
"url":"http://www.mikesmithdev.com/blog/youtube-video-event-tracking-with-google-analytics/"
},
{
"title":"Staff Meeting",
"allday":"false",
"description":"<p>This is just a fake description for the Staff Meeting.</p><p>Nothing to see!</p>",
"start":moment().subtract('days',6),
"end":moment().subtract('days',6),
"url":"http://www.mikesmithdev.com/blog/what-if-your-website-were-an-animal/"
},
{
"title":"Poker Night",
"allday":"false",
"description":"<p>This is just a fake description for the Poker Night.</p><p>Nothing to see!</p>",
"start":moment().subtract('days',2),
"end":moment().subtract('days',2),
"url":"http://www.mikesmithdev.com/blog/how-to-make-a-qr-code-in-asp-net/"
},
{
"title":"NES Gamers",
"allday":"false",
"description":"<p>This is just a fake description for the NES Gamers.</p><p>Nothing to see!</p>",
"start":moment(),
"end":moment(),
"url":"http://www.mikesmithdev.com/blog/name-that-nes-soundtrack/"
},
{
"title":"XBox Tourney",
"allday":"false",
"description":"<p>This is just a fake description for the XBox Tourney.</p><p>Nothing to see!</p>",
"start":moment().add('days',3),
"end":moment().add('days',3),
"url":"http://www.mikesmithdev.com/blog/worst-job-titles-in-internet-and-info-tech/"
},
{
"title":"Pool Party",
"allday":"false",
"description":"<p>This is just a fake description for the Pool Party.</p><p>Nothing to see!</p>",
"start":moment().add('days',5),
"end":moment().add('days',5),
"url":"http://www.mikesmithdev.com/blog/jquery-full-calendar/"
},
{
"title":"Staff Meeting",
"allday":"false",
"description":"<p>This is just a fake description for the Staff Meeting.</p><p>Nothing to see!</p>",
"start":moment().add('days',9),
"end":moment().add('days',9),
"url":"http://www.mikesmithdev.com/blog/keep-important-licensing-comments-dotnet-bundling-minification/"
},
{
"title":"Poker Night",
"allday":"false",
"description":"<p>This is just a fake description for the Poker Night.</p><p>Nothing to see!</p>",
"start":moment().add('days',11),
"end":moment().add('days',11),
"url":"http://www.mikesmithdev.com/blog/aspnet-bundling-changes-output-with-user-agent-eureka-1/"
},
{
"title":"Hackathon",
"allday":"false",
"description":"<p>This is just a fake description for the Hackathon.</p><p>Nothing to see!</p>",
"start":moment().add('days',15),
"end":moment().add('days',15),
"url":"http://www.mikesmithdev.com/blog/worst-job-titles-in-internet-and-info-tech/"
},
{
"title":"Beta Testing",
"allday":"false",
"description":"<p>This is just a fake description for the Beta Testing.</p><p>Nothing to see!</p>",
"start":moment().add('days',22),
"end":moment().add('days',22),
"url":"http://www.mikesmithdev.com/blog/worst-job-titles-in-internet-and-info-tech/"
},
{
"title":"Perl Meetup",
"allday":"false",
"description":"<p>This is just a fake description for the Perl Meetup.</p><p>Nothing to see... though no one would show up any way.</p>",
"start":moment().subtract('days',20),
"end":moment().subtract('days',20),
"url":"http://www.mikesmithdev.com/blog/migrating-from-asp-net-to-ghost-node-js/"
},
{
"title":"Node.js Meetup",
"allday":"false",
"description":"<p>This is just a fake description for the Node.js Meetup.</p><p>Nothing to see!</p>",
"start":moment().add('days',25),
"end":moment().add('days',25),
"url":"http://www.mikesmithdev.com/blog/pdf-secure-access-and-log-downloads/"
},
{
"title":"Javascript Meetup",
"allday":"false",
"description":"<p>This is just a fake description for the Javascript Meetup.</p><p>Nothing to see!</p>",
"start":moment().subtract('days',27),
"end":moment().subtract('days',27),
"url":"http://www.mikesmithdev.com/blog/migrating-from-asp-net-to-ghost-node-js/"
},
{
"title":"HTML Meetup",
"allday":"false",
"description":"<p>This is just a fake description for the HTML Meetup.</p><p>Nothing to see!</p>",
"start":moment().subtract('days',22),
"end":moment().subtract('days',22),
"url":"http://www.mikesmithdev.com/blog/migrating-from-asp-net-to-ghost-node-js/"
},
{
"title":"CSS Meetup",
"allday":"false",
"description":"<p>This is just a fake description for the CSS Meetup.</p><p>Nothing to see!</p>",
"start":moment().add('days',27),
"end":moment().add('days',27),
"url":"http://www.mikesmithdev.com/blog/migrating-from-asp-net-to-ghost-node-js/"
}
]
});
});
</script>
</body>
</html>