FullCalendar
FullCalendar Scheduler resources height
by makelele24
HTML
<link rel="stylesheet" href="https://fullcalendar.io/js/fullcalendar-3.1.0/fullcalendar.css">
<link rel="stylesheet" href="https://fullcalendar.io/js/fullcalendar-scheduler-1.5.0/scheduler.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script src="https://fullcalendar.io/js/fullcalendar-3.1.0/fullcalendar.js"></script>
<script src="https://fullcalendar.io/js/fullcalendar-scheduler-1.5.0/scheduler.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
<div id="calendar"></div>
CSS
.fc-resource-area .fc-content td:hover:not(.fc-divider), .fc-time-area .fc-cell-content:hover {
background: #0069d9;
color: white!important;
}
.selFila {
/*pointer-events: none!important;*/
cursor: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/happy.png"), auto!important;
text-decoration: none!important;
}
.filaResource {
background: #0069d9;
color: white!important;
}
.filaCal {
background: #80bdff;
opacity: 0.4;
}
JavaScript
$(function() { // document ready
$('#calendar').fullCalendar({
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
now: '2016-12-07',
editable: true,
scrollTime: '00:00',
navLinks: true,
header: {
left: 'today prev,next',
center: 'title',
right: 'timelineDay,timelineMonth'
},
defaultView: 'timelineMonth',
views: {
timelineThreeDays: {
type: 'timeline',
duration: {
days: 3
}
}
},
minTime: '06:00:00',
maxTime: '09:00:00',
resourceGroupField: 'building',
resourceColumns: [
{
labelText: 'first column',
field: 'title',
width: 150
}
],
resources: [{
id: 'a',
building: '460 Bryant',
title: 'Auditorium A',
title2: 'Auditorium A\nAddition info'
}, {
id: 'b',
building: '460 Bryant',
title: 'Auditorium B',
eventColor: 'green'
}, {
id: 'c',
building: '460 Bryant',
title: 'Auditorium C',
eventColor: 'orange'
}],
events: [{
id: '1',
resourceId: 'b',
start: '2016-12-07T02:00:00',
end: '2016-12-07T07:00:00',
title: 'event 1'
}, {
id: '2',
resourceId: 'c',
start: '2016-12-07T05:00:00',
end: '2016-12-07T22:00:00',
title: 'event 2'
}, {
id: '3',
resourceId: 'f',
start: '2016-12-07T00:30:00',
end: '2016-12-07T02:30:00',
title: 'event 5'
}]
});
});
/** EFECTO SELECCIÓN FILA CTRL+HOVER **/
let teclaPulsadaFila = false;
let hoverFila = false;
$(".fc-resource-area .fc-content td:not(.fc-divider)").hover(
function(e) {
hoverFila = true;
}, function(e) {
hoverFila = false;
$(".fc-resource-area .fc-content td:not(.fc-divider)").removeClass('selFila');
}); // Fin hover
$(document).keydown(function(e){
if (e.ctrlKey) {
teclaPulsadaFila...