MDL-59383 core_calendar: change modal body rendering
authorSimey Lameze <simey@moodle.com>
Wed, 12 Jul 2017 05:53:16 +0000 (13:53 +0800)
committerSimey Lameze <simey@moodle.com>
Wed, 12 Jul 2017 07:00:30 +0000 (15:00 +0800)
calendar/amd/build/calendar.min.js
calendar/amd/src/calendar.js

index 67a1cb2..b01198a 100644 (file)
Binary files a/calendar/amd/build/calendar.min.js and b/calendar/amd/build/calendar.min.js differ
index ace3364..6d1405f 100644 (file)
@@ -69,7 +69,13 @@ define(['jquery', 'core/ajax', 'core/str', 'core/templates', 'core/notification'
             }).then(function(eventdata) {
                 return modalPromise.done(function(modal) {
                     modal.setTitle(eventdata.name);
-                    modal.setBody(Templates.render('core_calendar/event_summary_body', eventdata));
+
+                    Templates.render(
+                        'core_calendar/event_summary_body',
+                        eventdata
+                    ).done(function(html, js) {
+                        Templates.replaceNodeContents(modal.getBody(), html, js);
+                    });
 
                     // Hide edit and delete buttons if I don't have permission.
                     if (eventdata.caneditevent == false) {