mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-64917 filepicker: change event dispatch
This commit is contained in:
parent
a672f021ea
commit
5b54a1c726
@ -683,7 +683,7 @@ M.core_filepicker.init = function(Y, options) {
|
||||
if (scope.options.editor_target && scope.options.env == 'editor') {
|
||||
// editor needs to update url
|
||||
scope.options.editor_target.value = urlimage;
|
||||
scope.options.editor_target.onchange();
|
||||
scope.options.editor_target.dispatchEvent(new Event('change'), {'bubbles': true});
|
||||
}
|
||||
var fileinfo = {'client_id':scope.options.client_id,
|
||||
'url': urlimage,
|
||||
@ -700,7 +700,7 @@ M.core_filepicker.init = function(Y, options) {
|
||||
var data = this.process_dlg.dialogdata;
|
||||
if (scope.options.editor_target && scope.options.env == 'editor') {
|
||||
scope.options.editor_target.value = data.newfile.url;
|
||||
scope.options.editor_target.onchange();
|
||||
scope.options.editor_target.dispatchEvent(new Event('change'), {'bubbles': true});
|
||||
}
|
||||
scope.hide();
|
||||
var formcallback_scope = scope.options.magicscope ? scope.options.magicscope : scope;
|
||||
@ -1235,7 +1235,7 @@ M.core_filepicker.init = function(Y, options) {
|
||||
}
|
||||
if (scope.options.editor_target && scope.options.env=='editor') {
|
||||
scope.options.editor_target.value=obj.url;
|
||||
scope.options.editor_target.onchange();
|
||||
scope.options.editor_target.dispatchEvent(new Event('change'), {'bubbles': true});
|
||||
}
|
||||
scope.hide();
|
||||
obj.client_id = client_id;
|
||||
@ -1803,7 +1803,7 @@ M.core_filepicker.init = function(Y, options) {
|
||||
}
|
||||
if (scope.options.editor_target&&scope.options.env=='editor') {
|
||||
scope.options.editor_target.value=o.url;
|
||||
scope.options.editor_target.onchange();
|
||||
scope.options.editor_target.dispatchEvent(new Event('change'), {'bubbles': true});
|
||||
}
|
||||
scope.hide();
|
||||
o.client_id = client_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user