Skip to content

Commit

Permalink
Add download files and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
enyo committed Oct 11, 2015
1 parent 849609e commit ba2f259
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 43 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dropzone",
"location": "enyo/dropzone",
"version": "4.1.0",
"version": "4.1.1",
"description": "Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.",
"homepage": "http://www.dropzonejs.com",
"main": [
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dropzone",
"repo": "enyo/dropzone",
"version": "4.1.0",
"version": "4.1.1",
"description": "Handles drag and drop of files for you.",
"scripts": [ "index.js", "dist/dropzone.js" ],
"styles": [ "dist/basic.css" ],
Expand Down
34 changes: 16 additions & 18 deletions dist/dropzone-amd-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -680,14 +680,9 @@
events: {
"click": function(evt) {
if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
return _this.hiddenFileInput.click();
}
},
"touchstart": function(evt) {
noPropagation(evt);
if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
return _this.hiddenFileInput.click();
_this.hiddenFileInput.click();
}
return true;
}
}
});
Expand Down Expand Up @@ -841,18 +836,21 @@

Dropzone.prototype.filesize = function(size) {
var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;
units = ['TB', 'GB', 'MB', 'KB', 'b'];
selectedSize = selectedUnit = null;
for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {
unit = units[i];
cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
if (size >= cutoff) {
selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
selectedUnit = unit;
break;
selectedSize = 0;
selectedUnit = "b";
if (size > 0) {
units = ['TB', 'GB', 'MB', 'KB', 'b'];
for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {
unit = units[i];
cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
if (size >= cutoff) {
selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
selectedUnit = unit;
break;
}
}
selectedSize = Math.round(10 * selectedSize) / 10;
}
selectedSize = Math.round(10 * selectedSize) / 10;
return "<strong>" + selectedSize + "</strong> " + selectedUnit;
};

Expand Down Expand Up @@ -1419,7 +1417,7 @@

})(Emitter);

Dropzone.version = "4.1.0";
Dropzone.version = "4.1.1";

Dropzone.options = {};

Expand Down
34 changes: 16 additions & 18 deletions dist/dropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,14 +668,9 @@
events: {
"click": function(evt) {
if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
return _this.hiddenFileInput.click();
}
},
"touchstart": function(evt) {
noPropagation(evt);
if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
return _this.hiddenFileInput.click();
_this.hiddenFileInput.click();
}
return true;
}
}
});
Expand Down Expand Up @@ -829,18 +824,21 @@

Dropzone.prototype.filesize = function(size) {
var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;
units = ['TB', 'GB', 'MB', 'KB', 'b'];
selectedSize = selectedUnit = null;
for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {
unit = units[i];
cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
if (size >= cutoff) {
selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
selectedUnit = unit;
break;
selectedSize = 0;
selectedUnit = "b";
if (size > 0) {
units = ['TB', 'GB', 'MB', 'KB', 'b'];
for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {
unit = units[i];
cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
if (size >= cutoff) {
selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
selectedUnit = unit;
break;
}
}
selectedSize = Math.round(10 * selectedSize) / 10;
}
selectedSize = Math.round(10 * selectedSize) / 10;
return "<strong>" + selectedSize + "</strong> " + selectedUnit;
};

Expand Down Expand Up @@ -1407,7 +1405,7 @@

})(Emitter);

Dropzone.version = "4.1.0";
Dropzone.version = "4.1.1";

Dropzone.options = {};

Expand Down
4 changes: 2 additions & 2 deletions dist/min/dropzone-amd-module.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/min/dropzone.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dropzone",
"version": "4.1.0",
"version": "4.1.1",
"description": "Handles drag and drop of files for you.",
"keywords": [
"dragndrop",
Expand Down
2 changes: 1 addition & 1 deletion src/dropzone.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ class Dropzone extends Emitter



Dropzone.version = "4.1.0"
Dropzone.version = "4.1.1"


# This is a map of options for your different dropzones. Add configurations
Expand Down
3 changes: 3 additions & 0 deletions test/test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba2f259

Please sign in to comment.