MDL-55324 filepicker: Explicitly set callback from showFilePicker

Prior to this patch the callback passed to showFilePicker was saved
and reused for subsequent calls. This doesn't allow the use of a function
for generating the callback.

This patch explicitly sets the callback each time.
This commit is contained in:
Cameron Ball
2016-11-23 11:56:40 +08:00
parent 0fbe41f4cd
commit a60a98d900
+1
View File
@@ -498,6 +498,7 @@ M.core_filepicker.show = function(Y, options) {
if (!M.core_filepicker.instances[options.client_id]) {
M.core_filepicker.init(Y, options);
}
M.core_filepicker.instances[options.client_id].options.formcallback = options.formcallback;
M.core_filepicker.instances[options.client_id].show();
};