<?php require '/inc/odbc.php';?>
|
<?php require '/inc/function.php';?>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="keywords" content="">
|
<meta name="description" content="">
|
<meta name="author" content="">
|
<title></title>
|
|
<!-- BEGIN PAGE LEVEL STYLES -->
|
<link href="assets/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet"/>
|
<link href="assets/plugins/full-calendar/fullcalendar.css" rel="stylesheet" type="text/css" />
|
<!-- END PAGE LEVEL STYLES -->
|
|
<link href="assets/css/icons.css" rel="stylesheet">
|
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
|
<link href="assets/css/style.css" rel="stylesheet">
|
<link href="assets/css/responsive.css" rel="stylesheet">
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
<!--[if lt IE 9]>
|
<script src="js/html5shiv.min.js"></script>
|
<script src="js/respond.min.js"></script>
|
<![endif]-->
|
|
</head>
|
<?php
|
$DayDate=empty($_REQUEST['DayDate'])!=false ? date("Y.m.d") : addslashes($_REQUEST['DayDate']);
|
?>
|
<body class="sticky-header">
|
|
|
|
<!--body wrapper start-->
|
<div class="wrapper">
|
|
|
|
|
<!-- Start row-->
|
<div class="row">
|
<div class="calendar-layout clearfix">
|
<div class="col-md-3">
|
<div class="white-box">
|
<div id='external-events'>
|
<h2 class="header-title">DRAGGABLE EVENTS</h2>
|
<div class='fc-event bg-primary'>Client Meeting 1</div>
|
<div class='fc-event bg-success'>Client Meeting 2</div>
|
<div class='fc-event bg-warning'>Client Meeting 3</div>
|
<div class='fc-event bg-danger'>Client Meeting 4</div>
|
<div class='fc-event bg-purple'>Client Meeting 5</div>
|
<div class='fc-event bg-success'>Client Meeting 6</div>
|
<div class='fc-event bg-danger'>Client Meeting 7</div>
|
<div class='fc-event bg-info'>Client Meeting 9</div>
|
</div>
|
</div>
|
</div>
|
|
<div class="col-md-9">
|
<div class="white-box">
|
<div id='calendar'></div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!-- End row-->
|
</div>
|
<!-- End Wrapper-->
|
|
|
|
<!--Begin core plugin -->
|
<script src="assets/js/jquery.min.js"></script>
|
<script src="assets/js/bootstrap.min.js"></script>
|
<script src="assets/plugins/moment/moment.js"></script>
|
<script src="assets/js/jquery.slimscroll.js "></script>
|
<script src="assets/js/jquery.nicescroll.js"></script>
|
<script src="assets/js/functions.js"></script>
|
<!-- End core plugin -->
|
|
<!-- BEGIN PAGE LEVEL SCRIPTS -->
|
<script type="text/javascript" src="assets/plugins/jquery-ui/jquery-ui.min.js"></script>
|
<script type="text/javascript" src="assets/plugins/moment/moment.js"></script>
|
<script type="text/javascript" src="assets/plugins/full-calendar/fullcalendar.js"></script>
|
<script>
|
|
$(document).ready(function() {
|
|
$('#external-events .fc-event').each(function() {
|
// store data so the calendar knows to render an event upon drop
|
$(this).data('event', {
|
title: $.trim($(this).text()), // use the element's text as the event title
|
color: '#FFBD4A',
|
stick: true // maintain when user navigates (see docs on the renderEvent method)
|
});
|
|
// make the event draggable using jQuery UI
|
$(this).draggable({
|
zIndex: 999,
|
revert: true, // will cause the event to go back to its
|
revertDuration: 0 // original position after the drag
|
});
|
|
});
|
|
|
/* initialize the calendar
|
-----------------------------------------------------------------*/
|
$('#calendar').fullCalendar({
|
defaultView: 'basicWeek',
|
header: {
|
left: 'prev,next today',
|
center: 'title',
|
right:''
|
},
|
defaultDate: '2020-03-01',
|
TrueDate: '<?php echo $DayDate;?>',
|
editable: true,
|
droppable: true,
|
eventLimit: true,
|
eventLimitClick: 'week',
|
eventClick: function(event, jsEvent, view) {
|
//点击删除事件
|
console.log("点击 "+event.id);
|
//"removeEvents",event.id
|
if (confirm("是否删除"+event.title)) {
|
$('#calendar').fullCalendar('removeEvents', event.id);
|
}
|
},
|
eventAfterRender: function(event, jsEvent) {
|
//事件移动拖动之后触发
|
//console.log(event.title + "显示至 " + event.start.format());
|
},
|
eventDrop: function(event, delta, revertFunc) {
|
//事件移动另一项目时
|
console.log(event.id + "移动至 " + event.start.format());
|
if (!confirm("是否移动?")) {
|
revertFunc();
|
}
|
},
|
|
events: [
|
{
|
id:1,
|
title: '用户1',
|
start: '2020-03-01',
|
color: '#FFBD4A',
|
Scheduling: '2020-11-24'
|
},
|
{
|
id:2,
|
title: '用户2',
|
start: '2020-03-01',
|
color: '#FC8AB1',
|
Scheduling: '2020-11-24'
|
},
|
{
|
id:3,
|
title: '用户3',
|
start: '2020-03-01',
|
color: '#668CFF',
|
Scheduling: '2020-11-24'
|
},
|
{
|
id:4,
|
title: '用户4',
|
start: '2020-03-02',
|
color: '#F05050',
|
Scheduling: '2020-11-24'
|
},
|
{
|
id:5,
|
title: '用户5',
|
start: '2020-03-03',
|
color: '#81C868',
|
Scheduling: '2020-11-24'
|
},
|
{
|
id:6,
|
title: '用户6',
|
start: '2020-03-03',
|
color: '#F05050',
|
Scheduling: '2020-11-24'
|
}
|
|
|
]
|
});
|
|
});
|
|
|
</script>
|
<!-- END PAGE LEVEL SCRIPTS -->
|
|
</body>
|
|
</html>
|