");if(a.length){var f=a.find(".hidden").clone(!1);e.html(f.html())}return e.html()}});g.set(a,!0)}if(f(a)){(0,b.default)(a).popover("show");a.addEventListener("mouseleave",i)}},i=function(a){if(g.has(a.target)){(0,b.default)(a.target).popover("hide")}a.target.removeEventListener("mouseleave",i)},j=function(){document.addEventListener("mouseover",function(a){var b=a.target.closest(c.elements.dateContainer);if(!b){return}a.preventDefault();h(b)})},k=!1;if(!k){j();k=!0}});
+//# sourceMappingURL=popover.min.js.map
diff --git a/calendar/amd/build/popover.min.js.map b/calendar/amd/build/popover.min.js.map
new file mode 100644
index 00000000000..b7b95133a9e
--- /dev/null
+++ b/calendar/amd/build/popover.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/popover.js"],"names":["isPopoverAvailable","dateContainer","window","getComputedStyle","querySelector","CalendarSelectors","elements","dateContent","display","isPopoverConfigured","Map","showPopover","target","has","dateEle","popover","trigger","placement","html","content","source","find","length","temptContent","clone","set","addEventListener","hidePopover","e","removeEventListener","registerEventListeners","document","closest","preventDefault","listenersRegistered"],"mappings":"2ZAyBA,uDACA,O,yiBAOMA,CAAAA,CAAkB,CAAG,SAACC,CAAD,CAAmB,CAC1C,MAAgH,MAAzG,GAAAC,MAAM,CAACC,gBAAP,CAAwBF,CAAa,CAACG,aAAd,CAA4BC,CAAiB,CAACC,QAAlB,CAA2BC,WAAvD,CAAxB,EAA6FC,OACvG,C,CAEKC,CAAmB,CAAG,GAAIC,CAAAA,G,CAE1BC,CAAW,CAAG,SAAAC,CAAM,CAAI,CAC1B,GAAI,CAACH,CAAmB,CAACI,GAApB,CAAwBD,CAAxB,CAAL,CAAsC,CAClC,GAAME,CAAAA,CAAO,CAAG,cAAOF,CAAP,CAAhB,CACAE,CAAO,CAACC,OAAR,CAAgB,CACZC,OAAO,CAAE,QADG,CAEZC,SAAS,CAAE,KAFC,CAGZC,IAAI,GAHQ,CAIZC,OAAO,CAAE,UAAM,IACLC,CAAAA,CAAM,CAAGN,CAAO,CAACO,IAAR,CAAahB,CAAiB,CAACC,QAAlB,CAA2BC,WAAxC,CADJ,CAELY,CAAO,CAAG,cAAO,OAAP,CAFL,CAGX,GAAIC,CAAM,CAACE,MAAX,CAAmB,CACf,GAAMC,CAAAA,CAAY,CAAGH,CAAM,CAACC,IAAP,CAAY,SAAZ,EAAuBG,KAAvB,IAArB,CACAL,CAAO,CAACD,IAAR,CAAaK,CAAY,CAACL,IAAb,EAAb,CACH,CACD,MAAOC,CAAAA,CAAO,CAACD,IAAR,EACV,CAZW,CAAhB,EAeAT,CAAmB,CAACgB,GAApB,CAAwBb,CAAxB,IACH,CAED,GAAIZ,CAAkB,CAACY,CAAD,CAAtB,CAAgC,CAC5B,cAAOA,CAAP,EAAeG,OAAf,CAAuB,MAAvB,EAEAH,CAAM,CAACc,gBAAP,CAAwB,YAAxB,CAAsCC,CAAtC,CACH,CACJ,C,CAEKA,CAAW,CAAG,SAAAC,CAAC,CAAI,CACrB,GAAInB,CAAmB,CAACI,GAApB,CAAwBe,CAAC,CAAChB,MAA1B,CAAJ,CAAuC,CACnC,cAAOgB,CAAC,CAAChB,MAAT,EAAiBG,OAAjB,CAAyB,MAAzB,CACH,CAEDa,CAAC,CAAChB,MAAF,CAASiB,mBAAT,CAA6B,YAA7B,CAA2CF,CAA3C,CACH,C,CAKKG,CAAsB,CAAG,UAAM,CACjCC,QAAQ,CAACL,gBAAT,CAA0B,WAA1B,CAAuC,SAAAE,CAAC,CAAI,CACxC,GAAM3B,CAAAA,CAAa,CAAG2B,CAAC,CAAChB,MAAF,CAASoB,OAAT,CAAiB3B,CAAiB,CAACC,QAAlB,CAA2BL,aAA5C,CAAtB,CACA,GAAI,CAACA,CAAL,CAAoB,CAChB,MACH,CAED2B,CAAC,CAACK,cAAF,GACAtB,CAAW,CAACV,CAAD,CACd,CARD,CAUH,C,CAEGiC,CAAmB,G,CACvB,GAAI,CAACA,CAAL,CAA0B,CACtBJ,CAAsB,GACtBI,CAAmB,GACtB,C","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see
.\n\n/**\n * Javascript popover for the `core_calendar` subsystem.\n *\n * @module core_calendar/popover\n * @copyright 2021 Huong Nguyen
\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 4.0\n */\n\nimport 'theme_boost/popover';\nimport jQuery from 'jquery';\nimport * as CalendarSelectors from 'core_calendar/selectors';\n\n/**\n * Check if we are allowing to enable the popover or not.\n * @param {Element} dateContainer\n * @returns {boolean}\n */\nconst isPopoverAvailable = (dateContainer) => {\n return window.getComputedStyle(dateContainer.querySelector(CalendarSelectors.elements.dateContent)).display === 'none';\n};\n\nconst isPopoverConfigured = new Map();\n\nconst showPopover = target => {\n if (!isPopoverConfigured.has(target)) {\n const dateEle = jQuery(target);\n dateEle.popover({\n trigger: 'manual',\n placement: 'top',\n html: true,\n content: () => {\n const source = dateEle.find(CalendarSelectors.elements.dateContent);\n const content = jQuery('');\n if (source.length) {\n const temptContent = source.find('.hidden').clone(false);\n content.html(temptContent.html());\n }\n return content.html();\n }\n });\n\n isPopoverConfigured.set(target, true);\n }\n\n if (isPopoverAvailable(target)) {\n jQuery(target).popover('show');\n\n target.addEventListener('mouseleave', hidePopover);\n }\n};\n\nconst hidePopover = e => {\n if (isPopoverConfigured.has(e.target)) {\n jQuery(e.target).popover('hide');\n }\n\n e.target.removeEventListener('mouseleave', hidePopover);\n};\n\n/**\n * Register events for date container.\n */\nconst registerEventListeners = () => {\n document.addEventListener('mouseover', e => {\n const dateContainer = e.target.closest(CalendarSelectors.elements.dateContainer);\n if (!dateContainer) {\n return;\n }\n\n e.preventDefault();\n showPopover(dateContainer);\n });\n\n};\n\nlet listenersRegistered = false;\nif (!listenersRegistered) {\n registerEventListeners();\n listenersRegistered = true;\n}\n"],"file":"popover.min.js"}
\ No newline at end of file
diff --git a/calendar/amd/build/selectors.min.js b/calendar/amd/build/selectors.min.js
index b53326578d3..a106b987011 100644
--- a/calendar/amd/build/selectors.min.js
+++ b/calendar/amd/build/selectors.min.js
@@ -1,2 +1,2 @@
-define ("core_calendar/selectors",[],function(){return{eventFilterItem:"[data-action='filter-event-type']",eventType:{site:"[data-eventtype-site]",category:"[data-eventtype-category]",course:"[data-eventtype-course]",group:"[data-eventtype-group]",user:"[data-eventtype-user]",other:"[data-eventtype-other]"},popoverType:{site:"[data-popover-eventtype-site]",category:"[data-popover-eventtype-category]",course:"[data-popover-eventtype-course]",group:"[data-popover-eventtype-group]",user:"[data-popover-eventtype-user]",other:"[data-popover-eventtype-other]"},calendarPeriods:{month:"[data-period='month']"},courseSelector:"select[name=\"course\"]",viewSelector:"div[data-region=\"view-selector\"]",actions:{create:"[data-action=\"new-event-button\"]",edit:"[data-action=\"edit\"]",remove:"[data-action=\"delete\"]",viewEvent:"[data-action=\"view-event\"]"},elements:{courseSelector:"select[name=\"course\"]"},today:".today",day:"[data-region=\"day\"]",calendarMain:"[data-region=\"calendar\"]",wrapper:".calendarwrapper",eventItem:"[data-type=\"event\"]",links:{navLink:".calendarwrapper .arrow_link",eventLink:"[data-region='event-item']",miniDayLink:"[data-region='mini-day-link']"},containers:{loadingIcon:"[data-region=\"overlay-icon-container\"]"},fullCalendarView:"page-calendar-view"}});
+define ("core_calendar/selectors",[],function(){return{eventFilterItem:"[data-action='filter-event-type']",eventType:{site:"[data-eventtype-site]",category:"[data-eventtype-category]",course:"[data-eventtype-course]",group:"[data-eventtype-group]",user:"[data-eventtype-user]",other:"[data-eventtype-other]"},popoverType:{site:"[data-popover-eventtype-site]",category:"[data-popover-eventtype-category]",course:"[data-popover-eventtype-course]",group:"[data-popover-eventtype-group]",user:"[data-popover-eventtype-user]",other:"[data-popover-eventtype-other]"},calendarPeriods:{month:"[data-period='month']"},courseSelector:"select[name=\"course\"]",viewSelector:"div[data-region=\"view-selector\"]",actions:{create:"[data-action=\"new-event-button\"]",edit:"[data-action=\"edit\"]",remove:"[data-action=\"delete\"]",viewEvent:"[data-action=\"view-event\"]"},elements:{courseSelector:"select[name=\"course\"]",dateContainer:".clickable.hasevent",dateContent:"[data-region=\"day-content\"]"},today:".today",day:"[data-region=\"day\"]",calendarMain:"[data-region=\"calendar\"]",wrapper:".calendarwrapper",eventItem:"[data-type=\"event\"]",links:{navLink:".calendarwrapper .arrow_link",eventLink:"[data-region='event-item']",miniDayLink:"[data-region='mini-day-link']"},containers:{loadingIcon:"[data-region=\"overlay-icon-container\"]"},fullCalendarView:"page-calendar-view"}});
//# sourceMappingURL=selectors.min.js.map
diff --git a/calendar/amd/build/selectors.min.js.map b/calendar/amd/build/selectors.min.js.map
index 2c35d3b36c6..3074c67b488 100644
--- a/calendar/amd/build/selectors.min.js.map
+++ b/calendar/amd/build/selectors.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["../src/selectors.js"],"names":["define","eventFilterItem","eventType","site","category","course","group","user","other","popoverType","calendarPeriods","month","courseSelector","viewSelector","actions","create","edit","remove","viewEvent","elements","today","day","calendarMain","wrapper","eventItem","links","navLink","eventLink","miniDayLink","containers","loadingIcon","fullCalendarView"],"mappings":"AAsBAA,OAAM,2BAAC,EAAD,CAAK,UAAW,CAClB,MAAO,CACHC,eAAe,CAAE,mCADd,CAEHC,SAAS,CAAE,CACPC,IAAI,CAAE,uBADC,CAEPC,QAAQ,CAAE,2BAFH,CAGPC,MAAM,CAAE,yBAHD,CAIPC,KAAK,CAAE,wBAJA,CAKPC,IAAI,CAAE,uBALC,CAMPC,KAAK,CAAE,wBANA,CAFR,CAUHC,WAAW,CAAE,CACTN,IAAI,CAAE,+BADG,CAETC,QAAQ,CAAE,mCAFD,CAGTC,MAAM,CAAE,iCAHC,CAITC,KAAK,CAAE,gCAJE,CAKTC,IAAI,CAAE,+BALG,CAMTC,KAAK,CAAE,gCANE,CAVV,CAkBHE,eAAe,CAAE,CACbC,KAAK,CAAE,uBADM,CAlBd,CAqBHC,cAAc,CAAE,yBArBb,CAsBHC,YAAY,CAAE,oCAtBX,CAuBHC,OAAO,CAAE,CACLC,MAAM,CAAE,oCADH,CAELC,IAAI,CAAE,wBAFD,CAGLC,MAAM,CAAE,0BAHH,CAILC,SAAS,CAAE,8BAJN,CAvBN,CA6BHC,QAAQ,CAAE,CACNP,cAAc,CAAE,yBADV,CA7BP,CAgCHQ,KAAK,CAAE,QAhCJ,CAiCHC,GAAG,CAAE,uBAjCF,CAkCHC,YAAY,CAAE,4BAlCX,CAmCHC,OAAO,CAAE,kBAnCN,CAoCHC,SAAS,CAAE,uBApCR,CAqCHC,KAAK,CAAE,CACHC,OAAO,CAAE,8BADN,CAEHC,SAAS,CAAE,4BAFR,CAGHC,WAAW,CAAE,+BAHV,CArCJ,CA0CHC,UAAU,CAAE,CACRC,WAAW,CAAE,0CADL,CA1CT,CA6CHC,gBAAgB,CAAE,oBA7Cf,CA+CV,CAhDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see
.\n\n/**\n * This module is responsible for the calendar filter.\n *\n * @module core_calendar/calendar_selectors\n * @copyright 2017 Andrew Nicols
\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n eventFilterItem: \"[data-action='filter-event-type']\",\n eventType: {\n site: \"[data-eventtype-site]\",\n category: \"[data-eventtype-category]\",\n course: \"[data-eventtype-course]\",\n group: \"[data-eventtype-group]\",\n user: \"[data-eventtype-user]\",\n other: \"[data-eventtype-other]\",\n },\n popoverType: {\n site: \"[data-popover-eventtype-site]\",\n category: \"[data-popover-eventtype-category]\",\n course: \"[data-popover-eventtype-course]\",\n group: \"[data-popover-eventtype-group]\",\n user: \"[data-popover-eventtype-user]\",\n other: \"[data-popover-eventtype-other]\",\n },\n calendarPeriods: {\n month: \"[data-period='month']\",\n },\n courseSelector: 'select[name=\"course\"]',\n viewSelector: 'div[data-region=\"view-selector\"]',\n actions: {\n create: '[data-action=\"new-event-button\"]',\n edit: '[data-action=\"edit\"]',\n remove: '[data-action=\"delete\"]',\n viewEvent: '[data-action=\"view-event\"]',\n },\n elements: {\n courseSelector: 'select[name=\"course\"]',\n },\n today: '.today',\n day: '[data-region=\"day\"]',\n calendarMain: '[data-region=\"calendar\"]',\n wrapper: '.calendarwrapper',\n eventItem: '[data-type=\"event\"]',\n links: {\n navLink: '.calendarwrapper .arrow_link',\n eventLink: \"[data-region='event-item']\",\n miniDayLink: \"[data-region='mini-day-link']\",\n },\n containers: {\n loadingIcon: '[data-region=\"overlay-icon-container\"]',\n },\n fullCalendarView: 'page-calendar-view',\n };\n});\n"],"file":"selectors.min.js"}
\ No newline at end of file
+{"version":3,"sources":["../src/selectors.js"],"names":["define","eventFilterItem","eventType","site","category","course","group","user","other","popoverType","calendarPeriods","month","courseSelector","viewSelector","actions","create","edit","remove","viewEvent","elements","dateContainer","dateContent","today","day","calendarMain","wrapper","eventItem","links","navLink","eventLink","miniDayLink","containers","loadingIcon","fullCalendarView"],"mappings":"AAsBAA,OAAM,2BAAC,EAAD,CAAK,UAAW,CAClB,MAAO,CACHC,eAAe,CAAE,mCADd,CAEHC,SAAS,CAAE,CACPC,IAAI,CAAE,uBADC,CAEPC,QAAQ,CAAE,2BAFH,CAGPC,MAAM,CAAE,yBAHD,CAIPC,KAAK,CAAE,wBAJA,CAKPC,IAAI,CAAE,uBALC,CAMPC,KAAK,CAAE,wBANA,CAFR,CAUHC,WAAW,CAAE,CACTN,IAAI,CAAE,+BADG,CAETC,QAAQ,CAAE,mCAFD,CAGTC,MAAM,CAAE,iCAHC,CAITC,KAAK,CAAE,gCAJE,CAKTC,IAAI,CAAE,+BALG,CAMTC,KAAK,CAAE,gCANE,CAVV,CAkBHE,eAAe,CAAE,CACbC,KAAK,CAAE,uBADM,CAlBd,CAqBHC,cAAc,CAAE,yBArBb,CAsBHC,YAAY,CAAE,oCAtBX,CAuBHC,OAAO,CAAE,CACLC,MAAM,CAAE,oCADH,CAELC,IAAI,CAAE,wBAFD,CAGLC,MAAM,CAAE,0BAHH,CAILC,SAAS,CAAE,8BAJN,CAvBN,CA6BHC,QAAQ,CAAE,CACNP,cAAc,CAAE,yBADV,CAENQ,aAAa,CAAE,qBAFT,CAGNC,WAAW,CAAE,+BAHP,CA7BP,CAkCHC,KAAK,CAAE,QAlCJ,CAmCHC,GAAG,CAAE,uBAnCF,CAoCHC,YAAY,CAAE,4BApCX,CAqCHC,OAAO,CAAE,kBArCN,CAsCHC,SAAS,CAAE,uBAtCR,CAuCHC,KAAK,CAAE,CACHC,OAAO,CAAE,8BADN,CAEHC,SAAS,CAAE,4BAFR,CAGHC,WAAW,CAAE,+BAHV,CAvCJ,CA4CHC,UAAU,CAAE,CACRC,WAAW,CAAE,0CADL,CA5CT,CA+CHC,gBAAgB,CAAE,oBA/Cf,CAiDV,CAlDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see .\n\n/**\n * This module is responsible for the calendar filter.\n *\n * @module core_calendar/calendar_selectors\n * @copyright 2017 Andrew Nicols \n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n return {\n eventFilterItem: \"[data-action='filter-event-type']\",\n eventType: {\n site: \"[data-eventtype-site]\",\n category: \"[data-eventtype-category]\",\n course: \"[data-eventtype-course]\",\n group: \"[data-eventtype-group]\",\n user: \"[data-eventtype-user]\",\n other: \"[data-eventtype-other]\",\n },\n popoverType: {\n site: \"[data-popover-eventtype-site]\",\n category: \"[data-popover-eventtype-category]\",\n course: \"[data-popover-eventtype-course]\",\n group: \"[data-popover-eventtype-group]\",\n user: \"[data-popover-eventtype-user]\",\n other: \"[data-popover-eventtype-other]\",\n },\n calendarPeriods: {\n month: \"[data-period='month']\",\n },\n courseSelector: 'select[name=\"course\"]',\n viewSelector: 'div[data-region=\"view-selector\"]',\n actions: {\n create: '[data-action=\"new-event-button\"]',\n edit: '[data-action=\"edit\"]',\n remove: '[data-action=\"delete\"]',\n viewEvent: '[data-action=\"view-event\"]',\n },\n elements: {\n courseSelector: 'select[name=\"course\"]',\n dateContainer: '.clickable.hasevent',\n dateContent: '[data-region=\"day-content\"]',\n },\n today: '.today',\n day: '[data-region=\"day\"]',\n calendarMain: '[data-region=\"calendar\"]',\n wrapper: '.calendarwrapper',\n eventItem: '[data-type=\"event\"]',\n links: {\n navLink: '.calendarwrapper .arrow_link',\n eventLink: \"[data-region='event-item']\",\n miniDayLink: \"[data-region='mini-day-link']\",\n },\n containers: {\n loadingIcon: '[data-region=\"overlay-icon-container\"]',\n },\n fullCalendarView: 'page-calendar-view',\n };\n});\n"],"file":"selectors.min.js"}
\ No newline at end of file
diff --git a/calendar/amd/src/calendar.js b/calendar/amd/src/calendar.js
index 19a8bd0897f..456ea2350c2 100644
--- a/calendar/amd/src/calendar.js
+++ b/calendar/amd/src/calendar.js
@@ -70,6 +70,8 @@ define([
VIEW_DAY_LINK: "[data-action='view-day-link']",
CALENDAR_MONTH_WRAPPER: ".calendarwrapper",
TODAY: '.today',
+ DAY_NUMBER_CIRCLE: '.day-number-circle',
+ DAY_NUMBER: '.day-number'
};
/**
@@ -173,10 +175,10 @@ define([
* @param {object} root The calendar root element
*/
var registerEventListeners = function(root) {
+ const viewingFullCalendar = document.getElementById(CalendarSelectors.fullCalendarView);
// Listen the click on the day link to render the day view.
root.on('click', SELECTORS.VIEW_DAY_LINK, function(e) {
- const viewingFullCalendar = document.getElementById(CalendarSelectors.fullCalendarView);
- var dayLink = $(e.target);
+ var dayLink = $(e.target).closest(SELECTORS.VIEW_DAY_LINK);
var year = dayLink.data('year'),
month = dayLink.data('month'),
day = dayLink.data('day'),
@@ -211,29 +213,35 @@ define([
if (contextId) {
// Bind click events to calendar days.
- root.on('click', SELECTORS.DAY, function (e) {
+ root.on('click', SELECTORS.DAY, function(e) {
var target = $(e.target);
+ const displayingSmallBlockCalendar = root.parents('aside').data('blockregion') === 'side-pre';
- if (!target.is(SELECTORS.VIEW_DAY_LINK)) {
- var startTime = $(this).attr('data-new-event-timestamp');
- eventFormPromise.then(function (modal) {
- var wrapper = target.closest(CalendarSelectors.wrapper);
- modal.setCourseId(wrapper.data('courseid'));
+ if (!viewingFullCalendar && displayingSmallBlockCalendar) {
+ const dateContainer = target.closest(SELECTORS.DAY);
+ const url = '?view=day&time=' + dateContainer.data('day-timestamp');
+ window.location.assign(Config.wwwroot + '/calendar/view.php' + url);
+ } else {
+ if (!target.is(SELECTORS.VIEW_DAY_LINK) &&
+ !target.is(SELECTORS.DAY_NUMBER_CIRCLE) && !target.is(SELECTORS.DAY_NUMBER)) {
+ var startTime = $(this).attr('data-new-event-timestamp');
+ eventFormPromise.then(function(modal) {
+ var wrapper = target.closest(CalendarSelectors.wrapper);
+ modal.setCourseId(wrapper.data('courseid'));
- var categoryId = wrapper.data('categoryid');
- if (typeof categoryId !== 'undefined') {
- modal.setCategoryId(categoryId);
- }
+ var categoryId = wrapper.data('categoryid');
+ if (typeof categoryId !== 'undefined') {
+ modal.setCategoryId(categoryId);
+ }
- modal.setContextId(wrapper.data('contextId'));
- modal.setStartTime(startTime);
- modal.show();
- return;
- })
- .fail(Notification.exception);
-
- e.preventDefault();
+ modal.setContextId(wrapper.data('contextId'));
+ modal.setStartTime(startTime);
+ modal.show();
+ return;
+ }).fail(Notification.exception);
+ e.preventDefault();
+ }
}
});
}
diff --git a/calendar/amd/src/popover.js b/calendar/amd/src/popover.js
new file mode 100644
index 00000000000..2435288f894
--- /dev/null
+++ b/calendar/amd/src/popover.js
@@ -0,0 +1,96 @@
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see .
+
+/**
+ * Javascript popover for the `core_calendar` subsystem.
+ *
+ * @module core_calendar/popover
+ * @copyright 2021 Huong Nguyen
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 4.0
+ */
+
+import 'theme_boost/popover';
+import jQuery from 'jquery';
+import * as CalendarSelectors from 'core_calendar/selectors';
+
+/**
+ * Check if we are allowing to enable the popover or not.
+ * @param {Element} dateContainer
+ * @returns {boolean}
+ */
+const isPopoverAvailable = (dateContainer) => {
+ return window.getComputedStyle(dateContainer.querySelector(CalendarSelectors.elements.dateContent)).display === 'none';
+};
+
+const isPopoverConfigured = new Map();
+
+const showPopover = target => {
+ if (!isPopoverConfigured.has(target)) {
+ const dateEle = jQuery(target);
+ dateEle.popover({
+ trigger: 'manual',
+ placement: 'top',
+ html: true,
+ content: () => {
+ const source = dateEle.find(CalendarSelectors.elements.dateContent);
+ const content = jQuery('');
+ if (source.length) {
+ const temptContent = source.find('.hidden').clone(false);
+ content.html(temptContent.html());
+ }
+ return content.html();
+ }
+ });
+
+ isPopoverConfigured.set(target, true);
+ }
+
+ if (isPopoverAvailable(target)) {
+ jQuery(target).popover('show');
+
+ target.addEventListener('mouseleave', hidePopover);
+ }
+};
+
+const hidePopover = e => {
+ if (isPopoverConfigured.has(e.target)) {
+ jQuery(e.target).popover('hide');
+ }
+
+ e.target.removeEventListener('mouseleave', hidePopover);
+};
+
+/**
+ * Register events for date container.
+ */
+const registerEventListeners = () => {
+ document.addEventListener('mouseover', e => {
+ const dateContainer = e.target.closest(CalendarSelectors.elements.dateContainer);
+ if (!dateContainer) {
+ return;
+ }
+
+ e.preventDefault();
+ showPopover(dateContainer);
+ });
+
+};
+
+let listenersRegistered = false;
+if (!listenersRegistered) {
+ registerEventListeners();
+ listenersRegistered = true;
+}
diff --git a/calendar/amd/src/selectors.js b/calendar/amd/src/selectors.js
index 94bd2eb3224..db5557f7f52 100644
--- a/calendar/amd/src/selectors.js
+++ b/calendar/amd/src/selectors.js
@@ -52,6 +52,8 @@ define([], function() {
},
elements: {
courseSelector: 'select[name="course"]',
+ dateContainer: '.clickable.hasevent',
+ dateContent: '[data-region="day-content"]',
},
today: '.today',
day: '[data-region="day"]',
diff --git a/calendar/templates/month_detailed.mustache b/calendar/templates/month_detailed.mustache
index 59247d034ff..e58fe2d295e 100644
--- a/calendar/templates/month_detailed.mustache
+++ b/calendar/templates/month_detailed.mustache
@@ -66,21 +66,23 @@
}}{{#durationevents.0}} duration{{/durationevents.0}}{{!
}}{{#durationevents}} duration_{{.}}{{/durationevents}}{{!
}}{{#defaulteventcontext}} clickable{{/defaulteventcontext}}{{!
+ }}{{#hasevents}} hasevent{{/hasevents}}{{!
}}"
data-day-timestamp="{{timestamp}}"
data-drop-zone="month-view-day"
data-region="day"
- data-new-event-timestamp="{{neweventtimestamp}}">
+ data-new-event-timestamp="{{neweventtimestamp}}"{{#istoday}} title="{{#str}} today, core_calendar {{/str}}"{{/istoday}}
+ {{#hasevents}} data-title="{{viewdaylinktitle}}"{{/hasevents}}>
{{daytitle}}
{{#hasevents}}
{{mday}}
+ data-timestamp="{{timestamp}}">
{{mday}}
{{/hasevents}}
{{^hasevents}}
-
{{mday}}
+
{{mday}}
{{/hasevents}}
{{#hasevents}}
@@ -121,6 +123,14 @@
{{/underway}}
{{/events}}
+
+ {{#events}}
+
+ {{> core_calendar/event_icon}}
+ {{{name}}}
+
+ {{/events}}
+
{{/hasevents}}
@@ -130,10 +140,10 @@
{{mday}}
+ data-timestamp="{{timestamp}}">
{{mday}}
{{/hasevents}}
{{^hasevents}}
-
{{mday}}
+
{{mday}}
{{/hasevents}}
diff --git a/calendar/tests/behat/behat_calendar.php b/calendar/tests/behat/behat_calendar.php
index 1195d212518..730cab029e7 100644
--- a/calendar/tests/behat/behat_calendar.php
+++ b/calendar/tests/behat/behat_calendar.php
@@ -38,6 +38,18 @@ use Behat\Gherkin\Node\TableNode as TableNode;
*/
class behat_calendar extends behat_base {
+ /**
+ * Return the list of partial named selectors.
+ *
+ * @return array
+ */
+ public static function get_partial_named_selectors(): array {
+ return [
+ new behat_component_named_selector('mini calendar block', [".//*[@data-block='calendar_month']"]),
+ new behat_component_named_selector('calendar day', [".//*[@data-day=%locator%]"]),
+ ];
+ }
+
/**
* Create event when starting on the front page.
*
@@ -119,10 +131,32 @@ class behat_calendar extends behat_base {
$dayofmonth = "a[{$daycontains}]";
$xpath = '//' . $currentmonth . '/descendant::' . $daycell . '/' . $dayofmonth;
- $this->execute("behat_general::wait_until_the_page_is_ready");
$this->execute("behat_general::i_hover", [$xpath, "xpath_element"]);
}
+ /**
+ * Hover over a specific day in the mini-calendar.
+ *
+ * @Given /^I hover over day "(?P\d+)" of this month in the mini-calendar block$/
+ * @param int $day The day of the current month
+ */
+ public function i_hover_over_day_of_this_month_in_mini_calendar_block(int $day): void {
+ $this->execute("behat_general::i_hover_in_the",
+ [$day, 'core_calendar > calendar day', '', 'core_calendar > mini calendar block']);
+ }
+
+ /**
+ * Hover over today in the mini-calendar.
+ *
+ * @Given /^I hover over today in the mini-calendar block$/
+ */
+ public function i_hover_over_today_in_mini_calendar_block(): void {
+ // For window's compatibility, using %d and not %e.
+ $todaysday = trim(strftime('%d'));
+ $todaysday = ltrim($todaysday, '0');
+ $this->i_hover_over_day_of_this_month_in_mini_calendar_block($todaysday);
+ }
+
/**
* Hover over today in the calendar.
*
diff --git a/calendar/tests/behat/minicalendar.feature b/calendar/tests/behat/minicalendar.feature
index 5b8784a6842..233ef6b007f 100644
--- a/calendar/tests/behat/minicalendar.feature
+++ b/calendar/tests/behat/minicalendar.feature
@@ -31,6 +31,7 @@ Feature: Open calendar popup
Then I should see "Event 1:1"
And I should see "Event 1:2"
And I am on homepage
+ When I hover over day "1" of this month in the mini-calendar block
And I should see "Event 1:1"
And I should see "Event 1:2"
@@ -59,4 +60,5 @@ Feature: Open calendar popup
| Event title | Today's event |
Then I should see "Today's event"
And I am on homepage
+ And I hover over today in the mini-calendar block
And I should see "Today's event"
diff --git a/lib/tests/behat/behat_general.php b/lib/tests/behat/behat_general.php
index b2431fd7827..f8c5706792a 100644
--- a/lib/tests/behat/behat_general.php
+++ b/lib/tests/behat/behat_general.php
@@ -352,6 +352,22 @@ class behat_general extends behat_base {
$node->mouseOver();
}
+ /**
+ * Generic mouse over action. Mouse over a element of the specified type.
+ *
+ * @When /^I hover over the "(?P(?:[^"]|\\")*)" "(?P[^"]*) in the "(?P(?:[^"]|\\")*)" "(?P[^"]*)"$/
+ * @param string $element Element we look for
+ * @param string $selectortype The type of what we look for
+ * @param string $containerelement Element we look for
+ * @param string $containerselectortype The type of what we look for
+ */
+ public function i_hover_in_the(string $element, $selectortype, string $containerelement, $containerselectortype): void {
+ // Gets the node based on the requested selector type and locator.
+ $node = $this->get_node_in_container($selectortype, $element, $containerselectortype, $containerselectortype);
+ $this->execute_js_on_node($node, '{{ELEMENT}}.scrollIntoView();');
+ $node->mouseOver();
+ }
+
/**
* Generic click action. Click on the element of the specified type.
*
diff --git a/theme/boost/scss/moodle/calendar.scss b/theme/boost/scss/moodle/calendar.scss
index 6b6e8901fa7..1c357f196d0 100644
--- a/theme/boost/scss/moodle/calendar.scss
+++ b/theme/boost/scss/moodle/calendar.scss
@@ -19,6 +19,9 @@ $calendarEventOtherBorder: 2px solid #687889 !default; // Gray.
// This will be the colour of mini-calendar links, hide/show filter icons, edit/delete icon buttons.
$calendarEventColor: #0d5ca1 !default;
+$calendarCurrentDateColor: $white;
+$calendarCurrentDateBackground: $primary;
+
// Calendar event background colours defined.
.calendar_event_category {
background-color: $calendarEventCategoryColor;
@@ -132,7 +135,8 @@ $calendarEventColor: #0d5ca1 !default;
.bottom {
text-align: left;
- padding: 20px 0 0 20px;
+ width: 98%;
+ margin: 10px auto;
@include footer-links;
}
@@ -212,12 +216,39 @@ $calendarEventColor: #0d5ca1 !default;
}
}
+ th {
+ text-align: left;
+ padding-left: 16px;
+ }
+
td {
height: 5em;
+
+ .day-number-circle {
+ display: inline-block;
+ line-height: 0;
+ width: 30px;
+ height: 30px;
+
+ .day-number {
+ display: inline-block;
+ padding: 50% 4px;
+ width: 100%;
+ text-align: center;
+ }
+ }
+
+ &.today {
+ .day-number-circle {
+ border-radius: 50%;
+ color: $calendarCurrentDateColor;
+ background-color: $calendarCurrentDateBackground;
+ }
+ }
}
.clickable:hover {
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
+ background-color: #ededed;
}
}
@@ -266,7 +297,7 @@ $calendarEventColor: #0d5ca1 !default;
.calendartable {
td,
li {
- padding: 0 4px 4px 4px;
+ padding: 4px;
}
li {
@@ -314,12 +345,8 @@ $calendarEventColor: #0d5ca1 !default;
// Block minicalendar.
.block {
.bottom {
- // This adds a border on the top side of the footer container.
- // So we won't have to add a
element in the footer_options template.
- border-top: $border-width solid $card-border-color;
- margin-top: map-get($spacers, 3);
- padding-top: map-get($spacers, 2);
-
+ width: 98%;
+ margin: 10px auto;
@include footer-links;
}
@@ -482,6 +509,37 @@ $calendarEventColor: #0d5ca1 !default;
}
}
+// Side block in Course view page is different with other side blocks.
+// We should hide the navigation text and re-arrange the Calendar links.
+.path-course-view {
+ .block {
+ &.block_calendar_month {
+ .maincalendar {
+ div.header {
+ visibility: hidden;
+ height: 0;
+ }
+ .calendarwrapper {
+ .arrow_text {
+ display: none;
+ }
+ }
+ }
+
+ .footer {
+ .bottom {
+ .footer-link {
+ display: block;
+ }
+ .footer-link:after {
+ content: none;
+ }
+ }
+ }
+ }
+ }
+}
+
/* Display month name above the calendar */
table.calendartable caption {
caption-side: top;
@@ -495,6 +553,128 @@ table.calendartable caption {
}
}
+@media (min-width: 1200px) {
+ section:not(#region-main) {
+ .block {
+ &.block_calendar_month {
+ .maincalendar {
+ div.header {
+ visibility: hidden;
+ height: 0;
+ }
+
+ .calendarwrapper {
+ .current {
+ width: 40%;
+ font-size: inherit;
+ line-height: inherit;
+ }
+
+ .previous,
+ .next {
+ width: 30%;
+ font-size: 0.8em;
+ }
+ }
+
+ .calendartable {
+ &.calendarmonth {
+ th,
+ td {
+ border: none;
+ text-align: center !important; // stylelint-disable-line declaration-no-important
+ padding: 0;
+ }
+
+ td {
+ height: auto;
+ font-size: 0.8em;
+
+ &.hasevent {
+ [data-region="day-content"] {
+ display: none;
+ }
+
+ .day-number {
+ display: inline-block;
+ position: relative;
+
+ &:before {
+ content: '.';
+ display: inline-block;
+ position: absolute;
+ bottom: 0.4em;
+ left: 0;
+ text-align: center;
+ width: 100%;
+ font-size: 3em;
+ color: inherit;
+ }
+ }
+ }
+ &:after {
+ content: '';
+ display: block;
+ margin-top: calc(100% - 26px);
+ }
+
+ &.clickable:hover {
+ background-color: inherit;
+ }
+
+ &.clickable:not(.today):hover {
+ .day-number-circle {
+ border-radius: 50%;
+ background-color: #ededed;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .bottom {
+ // This adds a border on the top side of the footer container.
+ // So we won't have to add a
element in the footer_options template.
+ border-top: $border-width solid $card-border-color;
+ padding-top: map-get($spacers, 2);
+ }
+ }
+ }
+ }
+}
+
+@media (max-width: 1200px) {
+ .maincalendar {
+ .calendartable {
+ &.calendarmonth {
+ th,
+ td {
+ border: none;
+ text-align: center !important; // stylelint-disable-line declaration-no-important
+ padding: 0;
+ }
+ td {
+ height: auto;
+ font-size: inherit;
+ padding: 0;
+
+ &.hasevent {
+ [data-region="day-content"] {
+ display: none;
+ }
+ }
+ &:after {
+ content: '';
+ display: block;
+ margin-top: calc(100% - 26px);
+ }
+ }
+ }
+ }
+ }
+}
+
.calendarwrapper {
position: relative;
}
diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css
index cb8b4df8d78..0f629a5ad3a 100644
--- a/theme/boost/style/moodle.css
+++ b/theme/boost/style/moodle.css
@@ -13175,7 +13175,8 @@ body.dragging .dragging {
padding: 0; }
.maincalendar .bottom {
text-align: left;
- padding: 20px 0 0 20px; }
+ width: 98%;
+ margin: 10px auto; }
.maincalendar .bottom span.footer-link:after {
content: "\2022";
color: #0f6fc5; }
@@ -13230,10 +13231,27 @@ body.dragging .dragging {
.maincalendar .calendarmonth ul li .calendar-circle.calendar_event_other {
background-color: #ced4da;
border: 2px solid #687889; }
+ .maincalendar .calendarmonth th {
+ text-align: left;
+ padding-left: 16px; }
.maincalendar .calendarmonth td {
height: 5em; }
+ .maincalendar .calendarmonth td .day-number-circle {
+ display: inline-block;
+ line-height: 0;
+ width: 30px;
+ height: 30px; }
+ .maincalendar .calendarmonth td .day-number-circle .day-number {
+ display: inline-block;
+ padding: 50% 4px;
+ width: 100%;
+ text-align: center; }
+ .maincalendar .calendarmonth td.today .day-number-circle {
+ border-radius: 50%;
+ color: #fff;
+ background-color: #0f6fc5; }
.maincalendar .calendarmonth .clickable:hover {
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); }
+ background-color: #ededed; }
.maincalendar .controls {
width: 98%;
margin: 10px auto; }
@@ -13258,7 +13276,7 @@ body.dragging .dragging {
border-color: #ced4da; }
.maincalendar .calendartable td,
.maincalendar .calendartable li {
- padding: 0 4px 4px 4px; }
+ padding: 4px; }
.maincalendar .calendartable li {
text-align: left; }
.maincalendar .header {
@@ -13279,9 +13297,8 @@ body.dragging .dragging {
padding-left: 20px; }
.block .bottom {
- border-top: 1px solid rgba(0, 0, 0, 0.125);
- margin-top: 1rem;
- padding-top: 0.5rem; }
+ width: 98%;
+ margin: 10px auto; }
.block .bottom span.footer-link:after {
content: "\2022";
color: #0f6fc5; }
@@ -13373,6 +13390,19 @@ body.dragging .dragging {
.block .content h3.eventskey {
margin-top: 0.5em; }
+.path-course-view .block.block_calendar_month .maincalendar div.header {
+ visibility: hidden;
+ height: 0; }
+
+.path-course-view .block.block_calendar_month .maincalendar .calendarwrapper .arrow_text {
+ display: none; }
+
+.path-course-view .block.block_calendar_month .footer .bottom .footer-link {
+ display: block; }
+
+.path-course-view .block.block_calendar_month .footer .bottom .footer-link:after {
+ content: none; }
+
/* Display month name above the calendar */
table.calendartable caption {
caption-side: top; }
@@ -13381,6 +13411,71 @@ table.calendartable caption {
#page-calender-view .container-fluid, #page-calender-view .container-sm, #page-calender-view .container-md, #page-calender-view .container-lg, #page-calender-view .container-xl {
min-width: 1024px; } }
+@media (min-width: 1200px) {
+ section:not(#region-main) .block.block_calendar_month .maincalendar div.header {
+ visibility: hidden;
+ height: 0; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendarwrapper .current {
+ width: 40%;
+ font-size: inherit;
+ line-height: inherit; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendarwrapper .previous,
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendarwrapper .next {
+ width: 30%;
+ font-size: 0.8em; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth th,
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td {
+ border: none;
+ text-align: center !important;
+ padding: 0; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td {
+ height: auto;
+ font-size: 0.8em; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.hasevent [data-region="day-content"] {
+ display: none; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.hasevent .day-number {
+ display: inline-block;
+ position: relative; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.hasevent .day-number:before {
+ content: '.';
+ display: inline-block;
+ position: absolute;
+ bottom: 0.4em;
+ left: 0;
+ text-align: center;
+ width: 100%;
+ font-size: 3em;
+ color: inherit; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td:after {
+ content: '';
+ display: block;
+ margin-top: calc(100% - 26px); }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.clickable:hover {
+ background-color: inherit; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.clickable:not(.today):hover .day-number-circle {
+ border-radius: 50%;
+ background-color: #ededed; }
+ section:not(#region-main) .block.block_calendar_month .bottom {
+ border-top: 1px solid rgba(0, 0, 0, 0.125);
+ padding-top: 0.5rem; } }
+
+@media (max-width: 1200px) {
+ .maincalendar .calendartable.calendarmonth th,
+ .maincalendar .calendartable.calendarmonth td {
+ border: none;
+ text-align: center !important;
+ padding: 0; }
+ .maincalendar .calendartable.calendarmonth td {
+ height: auto;
+ font-size: inherit;
+ padding: 0; }
+ .maincalendar .calendartable.calendarmonth td.hasevent [data-region="day-content"] {
+ display: none; }
+ .maincalendar .calendartable.calendarmonth td:after {
+ content: '';
+ display: block;
+ margin-top: calc(100% - 26px); } }
+
.calendarwrapper {
position: relative; }
diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css
index d99ffa7de6c..f00a76b21f9 100644
--- a/theme/classic/style/moodle.css
+++ b/theme/classic/style/moodle.css
@@ -13175,7 +13175,8 @@ body.dragging .dragging {
padding: 0; }
.maincalendar .bottom {
text-align: left;
- padding: 20px 0 0 20px; }
+ width: 98%;
+ margin: 10px auto; }
.maincalendar .bottom span.footer-link:after {
content: "\2022";
color: #0f6fc5; }
@@ -13230,10 +13231,27 @@ body.dragging .dragging {
.maincalendar .calendarmonth ul li .calendar-circle.calendar_event_other {
background-color: #ced4da;
border: 2px solid #687889; }
+ .maincalendar .calendarmonth th {
+ text-align: left;
+ padding-left: 16px; }
.maincalendar .calendarmonth td {
height: 5em; }
+ .maincalendar .calendarmonth td .day-number-circle {
+ display: inline-block;
+ line-height: 0;
+ width: 30px;
+ height: 30px; }
+ .maincalendar .calendarmonth td .day-number-circle .day-number {
+ display: inline-block;
+ padding: 50% 4px;
+ width: 100%;
+ text-align: center; }
+ .maincalendar .calendarmonth td.today .day-number-circle {
+ border-radius: 50%;
+ color: #fff;
+ background-color: #0f6fc5; }
.maincalendar .calendarmonth .clickable:hover {
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); }
+ background-color: #ededed; }
.maincalendar .controls {
width: 98%;
margin: 10px auto; }
@@ -13258,7 +13276,7 @@ body.dragging .dragging {
border-color: #ced4da; }
.maincalendar .calendartable td,
.maincalendar .calendartable li {
- padding: 0 4px 4px 4px; }
+ padding: 4px; }
.maincalendar .calendartable li {
text-align: left; }
.maincalendar .header {
@@ -13279,9 +13297,8 @@ body.dragging .dragging {
padding-left: 20px; }
.block .bottom {
- border-top: 1px solid rgba(0, 0, 0, 0.125);
- margin-top: 1rem;
- padding-top: 0.5rem; }
+ width: 98%;
+ margin: 10px auto; }
.block .bottom span.footer-link:after {
content: "\2022";
color: #0f6fc5; }
@@ -13373,6 +13390,19 @@ body.dragging .dragging {
.block .content h3.eventskey {
margin-top: 0.5em; }
+.path-course-view .block.block_calendar_month .maincalendar div.header {
+ visibility: hidden;
+ height: 0; }
+
+.path-course-view .block.block_calendar_month .maincalendar .calendarwrapper .arrow_text {
+ display: none; }
+
+.path-course-view .block.block_calendar_month .footer .bottom .footer-link {
+ display: block; }
+
+.path-course-view .block.block_calendar_month .footer .bottom .footer-link:after {
+ content: none; }
+
/* Display month name above the calendar */
table.calendartable caption {
caption-side: top; }
@@ -13381,6 +13411,71 @@ table.calendartable caption {
#page-calender-view .container-fluid, #page-calender-view .container-sm, #page-calender-view .container-md, #page-calender-view .container-lg, #page-calender-view .container-xl {
min-width: 1024px; } }
+@media (min-width: 1200px) {
+ section:not(#region-main) .block.block_calendar_month .maincalendar div.header {
+ visibility: hidden;
+ height: 0; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendarwrapper .current {
+ width: 40%;
+ font-size: inherit;
+ line-height: inherit; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendarwrapper .previous,
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendarwrapper .next {
+ width: 30%;
+ font-size: 0.8em; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth th,
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td {
+ border: none;
+ text-align: center !important;
+ padding: 0; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td {
+ height: auto;
+ font-size: 0.8em; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.hasevent [data-region="day-content"] {
+ display: none; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.hasevent .day-number {
+ display: inline-block;
+ position: relative; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.hasevent .day-number:before {
+ content: '.';
+ display: inline-block;
+ position: absolute;
+ bottom: 0.4em;
+ left: 0;
+ text-align: center;
+ width: 100%;
+ font-size: 3em;
+ color: inherit; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td:after {
+ content: '';
+ display: block;
+ margin-top: calc(100% - 26px); }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.clickable:hover {
+ background-color: inherit; }
+ section:not(#region-main) .block.block_calendar_month .maincalendar .calendartable.calendarmonth td.clickable:not(.today):hover .day-number-circle {
+ border-radius: 50%;
+ background-color: #ededed; }
+ section:not(#region-main) .block.block_calendar_month .bottom {
+ border-top: 1px solid rgba(0, 0, 0, 0.125);
+ padding-top: 0.5rem; } }
+
+@media (max-width: 1200px) {
+ .maincalendar .calendartable.calendarmonth th,
+ .maincalendar .calendartable.calendarmonth td {
+ border: none;
+ text-align: center !important;
+ padding: 0; }
+ .maincalendar .calendartable.calendarmonth td {
+ height: auto;
+ font-size: inherit;
+ padding: 0; }
+ .maincalendar .calendartable.calendarmonth td.hasevent [data-region="day-content"] {
+ display: none; }
+ .maincalendar .calendartable.calendarmonth td:after {
+ content: '';
+ display: block;
+ margin-top: calc(100% - 26px); } }
+
.calendarwrapper {
position: relative; }