Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-27919 also adding a callback to the filepicker when a file is ove…

…rwritten

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.
  • Loading branch information...
commit cb28940596c44a6411a9b8ab19655c84d553c8c1 1 parent 4491532
@jamiepratt jamiepratt authored samhemelryk committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 repository/filepicker.js
View
5 repository/filepicker.js
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.