Skip to content

Commit

Permalink
MDL-31499 Filepicker: download all function uses iframe instead of popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Jun 8, 2012
1 parent 4db0616 commit 98d5bad
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/form/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,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');
}
Expand Down

0 comments on commit 98d5bad

Please sign in to comment.