Skip to content

Commit

Permalink
Merge branch 'MDL-65671-master' of git://github.com/lameze/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve authored and stronk7 committed Jun 13, 2019
2 parents f568841 + e5ab472 commit d053310
Show file tree
Hide file tree
Showing 27 changed files with 212 additions and 36 deletions.
2 changes: 1 addition & 1 deletion calendar/amd/build/calendar.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion calendar/amd/build/calendar_threemonth.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion calendar/amd/build/selectors.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion calendar/amd/build/view_manager.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions calendar/amd/src/calendar.js
Expand Up @@ -172,6 +172,22 @@ define([
* @param {object} root The calendar root element
*/
var registerEventListeners = function(root) {
// Listen the click on the day link to render the day view.
root.on('click', SELECTORS.VIEW_DAY_LINK, function(e) {
var dayLink = $(e.target);
var year = dayLink.data('year'),
month = dayLink.data('month'),
day = dayLink.data('day'),
courseId = dayLink.data('courseid'),
categoryId = dayLink.data('categoryid');
CalendarViewManager.refreshDayContent(root, year, month, day, courseId, categoryId, root,
'core_calendar/calendar_day').then(function() {
e.preventDefault();
var url = '?view=day&time=' + dayLink.data('timestamp');
return window.history.pushState({}, '', url);
}).fail(Notification.exception);
});

root.on('change', CalendarSelectors.elements.courseSelector, function() {
var selectElement = $(this);
var courseId = selectElement.val();
Expand Down

0 comments on commit d053310

Please sign in to comment.