MDL-27919 also adding a callback to the filepicker when a file is overwritten
but a file with the same name. This is not necessary in most cases but is instant and some code may expect a call to the function whether the url and / or file name has changed or not so it can update itself when the file changes.
This commit is contained in:
@@ -211,6 +211,11 @@ M.core_filepicker.init = function(Y, options) {
|
||||
if (scope.options.editor_target && scope.options.env == 'editor') {
|
||||
scope.options.editor_target.value = data.existingfile.url;
|
||||
scope.options.editor_target.onchange();
|
||||
} else {
|
||||
var fileinfo = {'client_id':client_id,
|
||||
'url':data.existingfile.url,
|
||||
'file':data.existingfile.filename};
|
||||
scope.options.formcallback.apply(scope, [fileinfo]);
|
||||
}
|
||||
}
|
||||
}, true);
|
||||
|
||||
Reference in New Issue
Block a user