Merge branch 'MDL-31499-master-iframe' of git://github.com/FMCorz/moodle
authorAparup Banerjee <aparup@moodle.com>
Thu, 14 Jun 2012 09:08:18 +0000 (17:08 +0800)
committerAparup Banerjee <aparup@moodle.com>
Thu, 14 Jun 2012 09:08:18 +0000 (17:08 +0800)
lib/form/filemanager.js

index 530ad2e..132cbf7 100644 (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');
                         }