Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-33758 Filepicker: using iframe instead of popup windows for download

  • Loading branch information...
commit e7ae9c26000cd9fde5973319b9e4cb8ad6b54741 1 parent 8db5df0
@FMCorz FMCorz authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/form/filemanager.js
View
9 lib/form/filemanager.js
@@ -328,7 +328,6 @@ M.form_filemanager.init = function(Y, options) {
}
// setup 'download this folder' button
- // NOTE: popup window must be enabled to perform download process
button_download.on('click',function(e) {
e.preventDefault();
var scope = this;
@@ -733,7 +732,13 @@ M.form_filemanager.init = function(Y, options) {
selectnode.one('.fp-file-download').on('click', function(e) {
e.preventDefault();
if (this.selectui.fileinfo.type != 'folder') {
- window.open(this.selectui.fileinfo.url, 'fm-download-file');
+ node = Y.Node.create('<iframe></iframe>').setStyles({
+ visibility : 'hidden',
+ width : '1px',
+ height : '1px'
+ });
+ node.set('src', this.selectui.fileinfo.url);
+ Y.one('body').appendChild(node);
}
}, this);
selectnode.one('.fp-file-delete').on('click', function(e) {

0 comments on commit e7ae9c2

Please sign in to comment.
Something went wrong with that request. Please try again.