MDL-59383 core_modal: trigger event on modal module

This commit is contained in:
Simey Lameze
2017-07-12 18:28:11 +08:00
parent e1c811609b
commit f02e119afd
4 changed files with 7 additions and 12 deletions

View File

@@ -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));
}