forked from dropways/deskapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalendar.php
145 lines (143 loc) · 3.5 KB
/
calendar.php
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
<!DOCTYPE html>
<html>
<head>
<?php include('include/head.php'); ?>
<link rel="stylesheet" type="text/css" href="src/plugins/fullcalendar/fullcalendar.css">
</head>
<body>
<?php include('include/header.php'); ?>
<?php include('include/sidebar.php'); ?>
<div class="main-container">
<div class="pd-ltr-20 xs-pd-20-10">
<div class="min-height-200px">
<div class="page-header">
<div class="row">
<div class="col-md-12 col-sm-12">
<div class="title">
<h4>Calendar</h4>
</div>
<nav aria-label="breadcrumb" role="navigation">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Calendar</li>
</ol>
</nav>
</div>
</div>
</div>
<div class="pd-20 bg-white box-shadow mb-30">
<div class="row calendar-wrap">
<div class="col-xl-2 col-lg-3 col-md-12 col-sm-12">
<div id='external-events'>
<h4 class="mb-30">Draggable Events</h4>
<div class='fc-event'>My Event 1</div>
<div class='fc-event'>My Event 2</div>
<div class='fc-event'>My Event 3</div>
<div class='fc-event'>My Event 4</div>
<div class='fc-event'>My Event 5</div>
<div class="custom-control custom-checkbox mb-5">
<input type='checkbox' class="custom-control-input" id='drop-remove' />
<label class="custom-control-label" for='drop-remove'>remove after drop</label>
</div>
</div>
</div>
<div class="col-xl-10 col-lg-9 col-md-12 col-sm-12">
<div id='calendar'></div>
</div>
</div>
</div>
</div>
<?php include('include/footer.php'); ?>
</div>
</div>
<?php include('include/script.php'); ?>
<script src="src/plugins/fullcalendar/lib/jquery-ui.min.js"></script>
<script src="src/plugins/fullcalendar/fullcalendar.min.js"></script>
<script>
$(document).ready(function() {
$('#external-events .fc-event').each(function() {
$(this).data('event', {
title: $.trim($(this).text()),
stick: true
});
$(this).draggable({
zIndex: 999,
revert: true,
revertDuration: 0
});
});
$('#calendar').fullCalendar({
themeSystem: 'bootstrap4',
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
droppable: true,
drop: function() {
if ($('#drop-remove').is(':checked')) {
$(this).remove();
}
},
events: [
{
title: 'All Day Event',
start: '2018-04-01'
},
{
title: 'Long Event',
start: '2018-04-07',
end: '2018-04-10'
},
{
id: 999,
title: 'Repeating Event',
start: '2018-04-09T16:00:00'
},
{
id: 999,
title: 'Repeating Event',
start: '2018-04-16T16:00:00'
},
{
title: 'Conference',
start: '2018-04-11',
end: '2018-04-13'
},
{
title: 'Meeting',
start: '2018-04-12T10:30:00',
end: '2018-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2018-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2018-04-12T14:30:00'
},
{
title: 'Happy Hour',
start: '2018-04-12T17:30:00'
},
{
title: 'Dinner',
start: '2018-04-12T20:00:00'
},
{
title: 'Birthday Party',
start: '2018-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2018-04-28'
}
]
});
});
</script>
</body>
</html>