}).then(function(eventdata) {
return modalPromise.done(function(modal) {
modal.setTitle(eventdata.name);
-
- Templates.render(
- 'core_calendar/event_summary_body',
- eventdata
- ).done(function(html, js) {
- Templates.replaceNodeContents(modal.getBody(), html, js);
- });
-
+ modal.setBody(Templates.render('core_calendar/event_summary_body', eventdata));
// Hide edit and delete buttons if I don't have permission.
if (eventdata.caneditevent == false) {
modal.setFooter('');
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
- 'core/custom_interaction_events', 'core/modal_backdrop', 'core/modal_events'],
- function($, Templates, Notification, KeyCodes, CustomEvents, ModalBackdrop, ModalEvents) {
+ 'core/custom_interaction_events', 'core/modal_backdrop', 'core/event', 'core/modal_events'],
+ function($, Templates, Notification, KeyCodes, CustomEvents, ModalBackdrop, Event, ModalEvents) {
var SELECTORS = {
CONTAINER: '[data-region="modal-container"]',
if (typeof value === 'string') {
// Just set the value if it's a string.
body.html(value);
+ Event.notifyFilterContentUpdated(body);
} else {
// Otherwise we assume it's a promise to be resolved with
// html and javascript.
this.bodyJS = js;
}
}
+ Event.notifyFilterContentUpdated(body);
}.bind(this));
}.bind(this));
}