Skip to content

Commit

Permalink
MDL-59383 core_calendar: change modal body rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Jul 12, 2017
1 parent 8a5c06b commit e1c8116
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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.

8 changes: 7 additions & 1 deletion calendar/amd/src/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e1c8116

Please sign in to comment.