Permalink
Browse files

MDL-31499 Filepicker: download all function uses iframe instead of popup

  • Loading branch information...
1 parent 4db0616 commit 98d5bad9faa6edd67b4f1ac01a92c314667871f9 @FMCorz FMCorz committed Jun 8, 2012
Showing with 7 additions and 4 deletions.
  1. +7 −4 lib/form/filemanager.js
View
11 lib/form/filemanager.js
@@ -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');
}

0 comments on commit 98d5bad

Please sign in to comment.