mirror of
https://github.com/moodle/moodle.git
synced 2025-07-23 15:22:05 +02:00
MDL-59383 core_modal: trigger event on modal module
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
* @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"]',
|
||||
@@ -239,6 +239,7 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
|
||||
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.
|
||||
@@ -257,6 +258,7 @@ define(['jquery', 'core/templates', 'core/notification', 'core/key_codes',
|
||||
this.bodyJS = js;
|
||||
}
|
||||
}
|
||||
Event.notifyFilterContentUpdated(body);
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
}
|
||||
|
Reference in New Issue
Block a user