Skip to content

Commit

Permalink
Make uploads work without flash
Browse files Browse the repository at this point in the history
The new Swiff.Uploader.js is actually the Uploader.Request.js (combined
with Uploader.js) from
https://github.com/lovelyscalabledrawings/mootools-uploader
  • Loading branch information
knyar authored and FelixSchwarz committed Jan 15, 2021
1 parent 9082997 commit 59b4773
Show file tree
Hide file tree
Showing 8 changed files with 324 additions and 367 deletions.
5 changes: 4 additions & 1 deletion mediadrop/public/admin/scripts/media.js
Expand Up @@ -602,7 +602,7 @@ var FileManager = new Class({
},

onFileUploadProgress: function(file){
if (file.ui.progress) file.ui.progress.set('text', file.progress.percentLoaded + '%');
if (file.ui.progress) file.ui.progress.set('text', file.$progress.percentLoaded + '%');
},

onFileUploadComplete: function(file){
Expand Down Expand Up @@ -703,6 +703,9 @@ var FileList = new Class({
},

onUploadProgress: function(file){
if (!this.fxProgress) {
this.fxProgress = new Fx.ProgressBar(this.ui.progress.getElement('img'), this.options.fxProgressBar);
}
this.fxProgress.set(file.base.percentLoaded);
},

Expand Down
9 changes: 0 additions & 9 deletions mediadrop/public/admin/scripts/uploader.js
Expand Up @@ -72,15 +72,6 @@ var UploaderBase = new Class({
return new Element('span', this.options.uploadBtn).grab(new Element('span', {text: this.options.uploadBtnText}));
},

reposition: function(coords) {
// fix a logic bug when target is null
coords = coords || (this.target && this.target.offsetHeight
? this.target.getCoordinates(this.box.getOffsetParent())
: {top: window.getScrollTop(), left: 0, width: 1, height: 1});
this.box.setStyles(coords);
this.fireEvent('reposition', [coords, this.box, this.target]);
}

});

var Uploader = new Class({
Expand Down

This file was deleted.

0 comments on commit 59b4773

Please sign in to comment.