mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-60374 calendar: Add transition on event show/hide in monthly view
This commit is contained in:
parent
d8e9a23c48
commit
5873e1d234
@ -140,10 +140,26 @@ require([
|
|||||||
M.util.js_pending("month-detailed-{{uniqid}}-filterChanged");
|
M.util.js_pending("month-detailed-{{uniqid}}-filterChanged");
|
||||||
// A filter value has been changed.
|
// A filter value has been changed.
|
||||||
// Find all matching cells in the popover data, and hide them.
|
// Find all matching cells in the popover data, and hide them.
|
||||||
$("#month-detailed-{{uniqid}}")
|
var target = $("#month-detailed-{{uniqid}}").find(CalendarSelectors.eventType[data.type]);
|
||||||
.find(CalendarSelectors.eventType[data.type])
|
|
||||||
.toggleClass('hidden', !!data.hidden);
|
var transitionPromise = $.Deferred();
|
||||||
M.util.js_complete("month-detailed-{{uniqid}}-filterChanged");
|
if (data.hidden) {
|
||||||
|
transitionPromise.then(function() {
|
||||||
|
return target.slideUp('fast').promise();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
transitionPromise.then(function() {
|
||||||
|
return target.slideDown('fast').promise();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
transitionPromise.then(function() {
|
||||||
|
M.util.js_complete("month-detailed-{{uniqid}}-filterChanged");
|
||||||
|
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
|
||||||
|
transitionPromise.resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
{{/js}}
|
{{/js}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user