mirror of
https://github.com/moodle/moodle.git
synced 2025-03-13 20:26:32 +01:00
Merge branch 'MDL-59677-master-fix' of git://github.com/lameze/moodle
This commit is contained in:
commit
e825859078
2
calendar/amd/build/view_manager.min.js
vendored
2
calendar/amd/build/view_manager.min.js
vendored
@ -1 +1 @@
|
||||
define(["jquery","core/templates","core/notification","core_calendar/repository","core_calendar/events"],function(a,b,c,d,e){var f={ROOT:"[data-region='calendar']",CALENDAR_NAV_LINK:"span.calendarwrapper .arrow_link",CALENDAR_MONTH_WRAPPER:".calendarwrapper"},g=function(b){b=a(b),b.on("click",f.CALENDAR_NAV_LINK,function(c){var d=a(b).find(f.CALENDAR_MONTH_WRAPPER).data("courseid"),e=a(c.currentTarget);i(e.attr("href"),e.data("time"),d),c.preventDefault()})},h=function(a,e){return d.getCalendarMonthData(a,e).then(function(a){return b.render("core_calendar/month_detailed",a)}).then(function(a,c){return b.replaceNodeContents(f.CALENDAR_MONTH_WRAPPER,a,c)}).fail(c.exception)},i=function(b,c,d){return h(c,d).then(function(){window.history.pushState({},"",b)}).then(function(){a("body").trigger(e.monthChanged,[c,d])})},j=function(){var b=a(f.ROOT),c=b.find(f.CALENDAR_MONTH_WRAPPER).data("courseid"),d=b.find(f.CALENDAR_MONTH_WRAPPER).data("current-time");return h(d,c)};return{init:function(){g(f.ROOT)},reloadCurrentMonth:j,changeMonth:i,refreshMonthContent:h}});
|
||||
define(["jquery","core/templates","core/notification","core_calendar/repository","core_calendar/events"],function(a,b,c,d,e){var f={ROOT:"[data-region='calendar']",CALENDAR_NAV_LINK:"span.calendarwrapper .arrow_link",CALENDAR_MONTH_WRAPPER:".calendarwrapper"},g=function(b){b=a(b),b.on("click",f.CALENDAR_NAV_LINK,function(c){var d=a(b).find(f.CALENDAR_MONTH_WRAPPER).data("courseid"),e=a(c.currentTarget);i(e.attr("href"),e.data("time"),d),c.preventDefault()})},h=function(a,e){return d.getCalendarMonthData(a,e).then(function(a){return b.render("core_calendar/month_detailed",a)}).then(function(a,c){return b.replaceNodeContents(f.CALENDAR_MONTH_WRAPPER,a,c)}).fail(c.exception)},i=function(b,c,d){return h(c,d).then(function(){return window.history.pushState({},"",b),arguments}).then(function(){return a("body").trigger(e.monthChanged,[c,d]),arguments})},j=function(){var b=a(f.ROOT),c=b.find(f.CALENDAR_MONTH_WRAPPER).data("courseid"),d=b.find(f.CALENDAR_MONTH_WRAPPER).data("current-time");return h(d,c)};return{init:function(){g(f.ROOT)},reloadCurrentMonth:j,changeMonth:i,refreshMonthContent:h}});
|
@ -77,9 +77,11 @@ define(['jquery', 'core/templates', 'core/notification', 'core_calendar/reposito
|
||||
return refreshMonthContent(time, courseid)
|
||||
.then(function() {
|
||||
window.history.pushState({}, '', url);
|
||||
return arguments;
|
||||
})
|
||||
.then(function() {
|
||||
$('body').trigger(CalendarEvents.monthChanged, [time, courseid]);
|
||||
return arguments;
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user