diff --git a/front/php/templates/language/en_us.php b/front/php/templates/language/en_us.php index 4228fa50..ce25fa86 100755 --- a/front/php/templates/language/en_us.php +++ b/front/php/templates/language/en_us.php @@ -116,6 +116,7 @@ $lang['en_us'] = array( 'Presence_CalHead_quarter' => 'quarter', 'Presence_CalHead_month' => 'month', 'Presence_CalHead_week' => 'week', +'Presence_CalHead_day' => 'day', ////////////////////////////////////////////////////////////////// // Events Page diff --git a/front/presence.php b/front/presence.php index e45b1b90..bdc28d25 100755 --- a/front/presence.php +++ b/front/presence.php @@ -234,7 +234,7 @@ function initializeCalendar () { header: { left : 'prev,next today', center : 'title', - right : 'timelineYear,timelineMonth,timelineWeek' + right : 'timelineYear,timelineMonth,timelineWeek,timelineDay' }, defaultView : 'timelineMonth', height : 'auto', @@ -286,6 +286,13 @@ function initializeCalendar () { buttonText : '', slotLabelFormat : 'D', slotDuration : '24:00:01' + }, + timelineDay: { + type : 'timeline', + duration : { day: 1 }, + buttonText : '', + slotLabelFormat : 'H', + slotDuration : '00:30:00' } }, @@ -305,6 +312,15 @@ function initializeCalendar () { if (date.format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')) { cell.addClass ('fc-today'); }; + + if ($('#calendar').fullCalendar('getView').name == 'timelineDay') { + cell.removeClass('fc-sat'); + cell.removeClass('fc-sun'); + cell.removeClass('fc-today'); + if (date.format('YYYY-MM-DD HH') == moment().format('YYYY-MM-DD HH')) { + cell.addClass('fc-today'); + } + }; }, resourceRender: function (resourceObj, labelTds, bodyTds) {