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:
Jamie Pratt
2011-09-18 13:57:09 +07:00
parent 794cc7e1cf
commit 913b3cb30c
+5
View File
@@ -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);