Commit 9eced505 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

MDL-60560 calendar: Correct type of JS event on update

parent 84940517
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -423,12 +423,15 @@ define([
this.reloadBodyContent(formData);
return;
} else {
// Check whether this was a new event or not.
// The hide function unsets the form data so grab this before the hide.
var isExisting = this.hasEventId();
// No problemo! Our work here is done.
this.hide();
// Trigger the appropriate calendar event so that the view can
// be updated.
if (this.hasEventId()) {
// Trigger the appropriate calendar event so that the view can be updated.
if (isExisting) {
$('body').trigger(CalendarEvents.updated, [response.event]);
} else {
$('body').trigger(CalendarEvents.created, [response.event]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment