Merge branch 'MDL-31499-master-iframe' of git://github.com/FMCorz/moodle

This commit is contained in:
Aparup Banerjee 2012-06-14 17:08:18 +08:00
commit 60d3ff94db

View File

@ -339,10 +339,13 @@ M.form_filemanager.init = function(Y, options) {
callback: function(id, obj, args) {
if (obj) {
scope.refresh(obj.filepath);
var win = window.open(obj.fileurl, 'fm-download-folder');
if (!win) {
scope.print_msg(M.str.repository.popupblockeddownload, 'error');
}
node = Y.Node.create('<iframe></iframe>').setStyles({
visibility : 'hidden',
width : '1px',
height : '1px'
});
node.set('src', obj.fileurl);
Y.one('body').appendChild(node);
} else {
scope.print_msg(M.str.repository.draftareanofiles, 'error');
}