5 <title>AdminLTE | Calendar</title>
6 <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
7 <!-- bootstrap 3.0.2 -->
8 <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
10 <link href="../css/font-awesome.min.css" rel="stylesheet" type="text/css" />
12 <link href="../css/ionicons.min.css" rel="stylesheet" type="text/css" />
14 <link href="../css/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css" />
15 <link href="../css/fullcalendar/fullcalendar.print.css" rel="stylesheet" type="text/css" media='print' />
17 <link href="../css/AdminLTE.css" rel="stylesheet" type="text/css" />
19 <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
20 <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
22 <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
23 <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
26 <body class="skin-blue">
27 <!-- header logo: style can be found in header.less -->
28 <header class="header">
29 <a href="../index.html" class="logo">
30 <!-- Add the class icon to your logo image or logo icon to add the margining -->
33 <!-- Header Navbar: style can be found in header.less -->
34 <nav class="navbar navbar-static-top" role="navigation">
35 <!-- Sidebar toggle button-->
36 <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
37 <span class="sr-only">Toggle navigation</span>
38 <span class="icon-bar"></span>
39 <span class="icon-bar"></span>
40 <span class="icon-bar"></span>
42 <div class="navbar-right">
43 <ul class="nav navbar-nav">
44 <!-- Messages: style can be found in dropdown.less-->
45 <li class="dropdown messages-menu">
46 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
47 <i class="fa fa-envelope"></i>
48 <span class="label label-success">4</span>
50 <ul class="dropdown-menu">
51 <li class="header">You have 4 messages</li>
53 <!-- inner menu: contains the actual data -->
55 <li><!-- start message -->
57 <div class="pull-left">
58 <img src="../img/avatar3.png" class="img-circle" alt="User Image"/>
62 <small><i class="fa fa-clock-o"></i> 5 mins</small>
64 <p>Why not buy a new awesome theme?</p>
66 </li><!-- end message -->
69 <div class="pull-left">
70 <img src="../img/avatar2.png" class="img-circle" alt="user image"/>
74 <small><i class="fa fa-clock-o"></i> 2 hours</small>
76 <p>Why not buy a new awesome theme?</p>
81 <div class="pull-left">
82 <img src="../img/avatar.png" class="img-circle" alt="user image"/>
86 <small><i class="fa fa-clock-o"></i> Today</small>
88 <p>Why not buy a new awesome theme?</p>
93 <div class="pull-left">
94 <img src="../img/avatar2.png" class="img-circle" alt="user image"/>
98 <small><i class="fa fa-clock-o"></i> Yesterday</small>
100 <p>Why not buy a new awesome theme?</p>
105 <div class="pull-left">
106 <img src="../img/avatar.png" class="img-circle" alt="user image"/>
110 <small><i class="fa fa-clock-o"></i> 2 days</small>
112 <p>Why not buy a new awesome theme?</p>
117 <li class="footer"><a href="#">See All Messages</a></li>
120 <!-- Notifications: style can be found in dropdown.less -->
121 <li class="dropdown notifications-menu">
122 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
123 <i class="fa fa-warning"></i>
124 <span class="label label-warning">10</span>
126 <ul class="dropdown-menu">
127 <li class="header">You have 10 notifications</li>
129 <!-- inner menu: contains the actual data -->
133 <i class="ion ion-ios7-people info"></i> 5 new members joined today
138 <i class="fa fa-warning danger"></i> Very long description here that may not fit into the page and may cause design problems
143 <i class="fa fa-users warning"></i> 5 new members joined
149 <i class="ion ion-ios7-cart success"></i> 25 sales made
154 <i class="ion ion-ios7-person danger"></i> You changed your username
159 <li class="footer"><a href="#">View all</a></li>
162 <!-- Tasks: style can be found in dropdown.less -->
163 <li class="dropdown tasks-menu">
164 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
165 <i class="fa fa-tasks"></i>
166 <span class="label label-danger">9</span>
168 <ul class="dropdown-menu">
169 <li class="header">You have 9 tasks</li>
171 <!-- inner menu: contains the actual data -->
173 <li><!-- Task item -->
177 <small class="pull-right">20%</small>
179 <div class="progress xs">
180 <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
181 <span class="sr-only">20% Complete</span>
185 </li><!-- end task item -->
186 <li><!-- Task item -->
190 <small class="pull-right">40%</small>
192 <div class="progress xs">
193 <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
194 <span class="sr-only">40% Complete</span>
198 </li><!-- end task item -->
199 <li><!-- Task item -->
202 Some task I need to do
203 <small class="pull-right">60%</small>
205 <div class="progress xs">
206 <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
207 <span class="sr-only">60% Complete</span>
211 </li><!-- end task item -->
212 <li><!-- Task item -->
215 Make beautiful transitions
216 <small class="pull-right">80%</small>
218 <div class="progress xs">
219 <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
220 <span class="sr-only">80% Complete</span>
224 </li><!-- end task item -->
228 <a href="#">View all tasks</a>
232 <!-- User Account: style can be found in dropdown.less -->
233 <li class="dropdown user user-menu">
234 <a href="#" class="dropdown-toggle" data-toggle="dropdown">
235 <i class="glyphicon glyphicon-user"></i>
236 <span>Jane Doe <i class="caret"></i></span>
238 <ul class="dropdown-menu">
240 <li class="user-header bg-light-blue">
241 <img src="../img/avatar3.png" class="img-circle" alt="User Image" />
243 Jane Doe - Web Developer
244 <small>Member since Nov. 2012</small>
248 <li class="user-body">
249 <div class="col-xs-4 text-center">
250 <a href="#">Followers</a>
252 <div class="col-xs-4 text-center">
253 <a href="#">Sales</a>
255 <div class="col-xs-4 text-center">
256 <a href="#">Friends</a>
260 <li class="user-footer">
261 <div class="pull-left">
262 <a href="#" class="btn btn-default btn-flat">Profile</a>
264 <div class="pull-right">
265 <a href="#" class="btn btn-default btn-flat">Sign out</a>
274 <div class="wrapper row-offcanvas row-offcanvas-left">
275 <!-- Left side column. contains the logo and sidebar -->
276 <aside class="left-side sidebar-offcanvas">
277 <!-- sidebar: style can be found in sidebar.less -->
278 <section class="sidebar">
279 <!-- Sidebar user panel -->
280 <div class="user-panel">
281 <div class="pull-left image">
282 <img src="../img/avatar3.png" class="img-circle" alt="User Image" />
284 <div class="pull-left info">
287 <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
291 <form action="#" method="get" class="sidebar-form">
292 <div class="input-group">
293 <input type="text" name="q" class="form-control" placeholder="Search..."/>
294 <span class="input-group-btn">
295 <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
299 <!-- /.search form -->
300 <!-- sidebar menu: : style can be found in sidebar.less -->
301 <ul class="sidebar-menu">
303 <a href="../index.html">
304 <i class="fa fa-dashboard"></i> <span>Dashboard</span>
308 <a href="widgets.html">
309 <i class="fa fa-th"></i> <span>Widgets</span> <small class="badge pull-right bg-green">new</small>
312 <li class="treeview">
314 <i class="fa fa-bar-chart-o"></i>
316 <i class="fa fa-angle-left pull-right"></i>
318 <ul class="treeview-menu">
319 <li><a href="charts/morris.html"><i class="fa fa-angle-double-right"></i> Morris</a></li>
320 <li><a href="charts/flot.html"><i class="fa fa-angle-double-right"></i> Flot</a></li>
321 <li><a href="charts/inline.html"><i class="fa fa-angle-double-right"></i> Inline charts</a></li>
324 <li class="treeview">
326 <i class="fa fa-laptop"></i>
327 <span>UI Elements</span>
328 <i class="fa fa-angle-left pull-right"></i>
330 <ul class="treeview-menu">
331 <li><a href="UI/general.html"><i class="fa fa-angle-double-right"></i> General</a></li>
332 <li><a href="UI/icons.html"><i class="fa fa-angle-double-right"></i> Icons</a></li>
333 <li><a href="UI/buttons.html"><i class="fa fa-angle-double-right"></i> Buttons</a></li>
334 <li><a href="UI/sliders.html"><i class="fa fa-angle-double-right"></i> Sliders</a></li>
335 <li><a href="UI/timeline.html"><i class="fa fa-angle-double-right"></i> Timeline</a></li>
338 <li class="treeview">
340 <i class="fa fa-edit"></i> <span>Forms</span>
341 <i class="fa fa-angle-left pull-right"></i>
343 <ul class="treeview-menu">
344 <li><a href="forms/general.html"><i class="fa fa-angle-double-right"></i> General Elements</a></li>
345 <li><a href="forms/advanced.html"><i class="fa fa-angle-double-right"></i> Advanced Elements</a></li>
346 <li><a href="forms/editors.html"><i class="fa fa-angle-double-right"></i> Editors</a></li>
349 <li class="treeview">
351 <i class="fa fa-table"></i> <span>Tables</span>
352 <i class="fa fa-angle-left pull-right"></i>
354 <ul class="treeview-menu">
355 <li><a href="tables/simple.html"><i class="fa fa-angle-double-right"></i> Simple tables</a></li>
356 <li><a href="tables/data.html"><i class="fa fa-angle-double-right"></i> Data tables</a></li>
360 <a href="calendar.html">
361 <i class="fa fa-calendar"></i> <span>Calendar</span>
362 <small class="badge pull-right bg-red">3</small>
366 <a href="mailbox.html">
367 <i class="fa fa-envelope"></i> <span>Mailbox</span>
368 <small class="badge pull-right bg-yellow">12</small>
371 <li class="treeview">
373 <i class="fa fa-folder"></i> <span>Examples</span>
374 <i class="fa fa-angle-left pull-right"></i>
376 <ul class="treeview-menu">
377 <li><a href="examples/invoice.html"><i class="fa fa-angle-double-right"></i> Invoice</a></li>
378 <li><a href="examples/login.html"><i class="fa fa-angle-double-right"></i> Login</a></li>
379 <li><a href="examples/register.html"><i class="fa fa-angle-double-right"></i> Register</a></li>
380 <li><a href="examples/lockscreen.html"><i class="fa fa-angle-double-right"></i> Lockscreen</a></li>
381 <li><a href="examples/404.html"><i class="fa fa-angle-double-right"></i> 404 Error</a></li>
382 <li><a href="examples/500.html"><i class="fa fa-angle-double-right"></i> 500 Error</a></li>
383 <li><a href="examples/blank.html"><i class="fa fa-angle-double-right"></i> Blank Page</a></li>
391 <!-- Right side column. Contains the navbar and content of the page -->
392 <aside class="right-side">
393 <!-- Content Header (Page header) -->
394 <section class="content-header">
397 <small>Control panel</small>
399 <ol class="breadcrumb">
400 <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
401 <li class="active">Calendar</li>
405 <!-- Main content -->
406 <section class="content">
410 <div class="col-md-3">
411 <div class="box box-primary">
412 <div class="box-header">
413 <h4 class="box-title">Draggable Events</h4>
415 <div class="box-body">
417 <div id='external-events'>
418 <div class='external-event bg-green'>Lunch</div>
419 <div class='external-event bg-red'>Go home</div>
420 <div class='external-event bg-aqua'>Do homework</div>
421 <div class='external-event bg-yellow'>Work on UI design</div>
422 <div class='external-event bg-navy'>Sleep tight</div>
424 <input type='checkbox' id='drop-remove' /> <label for='drop-remove'>remove after drop</label>
427 </div><!-- /.box-body -->
428 </div><!-- /. box -->
429 <div class="box box-primary">
430 <div class="box-header">
431 <h3 class="box-title">Create Event</h3>
433 <div class="box-body">
434 <div class="btn-group" style="width: 100%; margin-bottom: 10px;">
435 <button type="button" id="color-chooser-btn" class="btn btn-danger btn-block btn-sm dropdown-toggle" data-toggle="dropdown">Color <span class="caret"></span></button>
436 <ul class="dropdown-menu" id="color-chooser">
437 <li><a class="text-green" href="#"><i class="fa fa-square"></i> Green</a></li>
438 <li><a class="text-blue" href="#"><i class="fa fa-square"></i> Blue</a></li>
439 <li><a class="text-navy" href="#"><i class="fa fa-square"></i> Navy</a></li>
440 <li><a class="text-yellow" href="#"><i class="fa fa-square"></i> Yellow</a></li>
441 <li><a class="text-orange" href="#"><i class="fa fa-square"></i> Orange</a></li>
442 <li><a class="text-aqua" href="#"><i class="fa fa-square"></i> Aqua</a></li>
443 <li><a class="text-red" href="#"><i class="fa fa-square"></i> Red</a></li>
444 <li><a class="text-fuchsia" href="#"><i class="fa fa-square"></i> Fuchsia</a></li>
445 <li><a class="text-purple" href="#"><i class="fa fa-square"></i> Purple</a></li>
447 </div><!-- /btn-group -->
448 <div class="input-group">
449 <input id="new-event" type="text" class="form-control" placeholder="Event Title">
450 <div class="input-group-btn">
451 <button id="add-new-event" type="button" class="btn btn-default btn-flat">Add</button>
452 </div><!-- /btn-group -->
453 </div><!-- /input-group -->
457 <div class="col-md-9">
458 <div class="box box-primary">
459 <div class="box-body no-padding">
460 <!-- THE CALENDAR -->
461 <div id="calendar"></div>
462 </div><!-- /.box-body -->
463 </div><!-- /. box -->
468 </section><!-- /.content -->
469 </aside><!-- /.right-side -->
470 </div><!-- ./wrapper -->
473 <!-- jQuery 2.0.2 -->
474 <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
475 <!-- jQuery UI 1.10.3 -->
476 <script src="../js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
478 <script src="../js/bootstrap.min.js" type="text/javascript"></script>
479 <!-- AdminLTE App -->
480 <script src="../js/AdminLTE/app.js" type="text/javascript"></script>
481 <!-- fullCalendar -->
482 <script src="../js/plugins/fullcalendar/fullcalendar.min.js" type="text/javascript"></script>
483 <!-- Page specific script -->
484 <script type="text/javascript">
487 /* initialize the external events
488 -----------------------------------------------------------------*/
489 function ini_events(ele) {
490 ele.each(function() {
492 // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
493 // it doesn't need to have a start or end
495 title: $.trim($(this).text()) // use the element's text as the event title
498 // store the Event Object in the DOM element so we can get to it later
499 $(this).data('eventObject', eventObject);
501 // make the event draggable using jQuery UI
504 revert: true, // will cause the event to go back to its
505 revertDuration: 0 // original position after the drag
510 ini_events($('#external-events div.external-event'));
512 /* initialize the calendar
513 -----------------------------------------------------------------*/
514 //Date for the calendar events (dummy data)
515 var date = new Date();
516 var d = date.getDate(),
518 y = date.getFullYear();
519 $('#calendar').fullCalendar({
521 left: 'prev,next today',
523 right: 'month,agendaWeek,agendaDay'
525 buttonText: {//This is to add icons to the visible buttons
526 prev: "<span class='fa fa-caret-left'></span>",
527 next: "<span class='fa fa-caret-right'></span>",
533 //Random default events
536 title: 'All Day Event',
537 start: new Date(y, m, 1),
538 backgroundColor: "#f56954", //red
539 borderColor: "#f56954" //red
543 start: new Date(y, m, d - 5),
544 end: new Date(y, m, d - 2),
545 backgroundColor: "#f39c12", //yellow
546 borderColor: "#f39c12" //yellow
550 start: new Date(y, m, d, 10, 30),
552 backgroundColor: "#0073b7", //Blue
553 borderColor: "#0073b7" //Blue
557 start: new Date(y, m, d, 12, 0),
558 end: new Date(y, m, d, 14, 0),
560 backgroundColor: "#00c0ef", //Info (aqua)
561 borderColor: "#00c0ef" //Info (aqua)
564 title: 'Birthday Party',
565 start: new Date(y, m, d + 1, 19, 0),
566 end: new Date(y, m, d + 1, 22, 30),
568 backgroundColor: "#00a65a", //Success (green)
569 borderColor: "#00a65a" //Success (green)
572 title: 'Click for Google',
573 start: new Date(y, m, 28),
574 end: new Date(y, m, 29),
575 url: 'http://google.com/',
576 backgroundColor: "#3c8dbc", //Primary (light-blue)
577 borderColor: "#3c8dbc" //Primary (light-blue)
581 droppable: true, // this allows things to be dropped onto the calendar !!!
582 drop: function(date, allDay) { // this function is called when something is dropped
584 // retrieve the dropped element's stored Event Object
585 var originalEventObject = $(this).data('eventObject');
587 // we need to copy it, so that multiple events don't have a reference to the same object
588 var copiedEventObject = $.extend({}, originalEventObject);
590 // assign it the date that was reported
591 copiedEventObject.start = date;
592 copiedEventObject.allDay = allDay;
593 copiedEventObject.backgroundColor = $(this).css("background-color");
594 copiedEventObject.borderColor = $(this).css("border-color");
596 // render the event on the calendar
597 // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
598 $('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
600 // is the "remove after drop" checkbox checked?
601 if ($('#drop-remove').is(':checked')) {
602 // if so, remove the element from the "Draggable Events" list
610 var currColor = "#f56954"; //Red by default
611 //Color chooser button
612 var colorChooser = $("#color-chooser-btn");
613 $("#color-chooser > li > a").click(function(e) {
616 currColor = $(this).css("color");
617 //Add color effect to button
619 .css({"background-color": currColor, "border-color": currColor})
620 .html($(this).text()+' <span class="caret"></span>');
622 $("#add-new-event").click(function(e) {
624 //Get value and make sure it is not null
625 var val = $("#new-event").val();
626 if (val.length == 0) {
631 var event = $("<div />");
632 event.css({"background-color": currColor, "border-color": currColor, "color": "#fff"}).addClass("external-event");
634 $('#external-events').prepend(event);
636 //Add draggable funtionality
639 //Remove event from text input
640 $("#new-event").val("");