Skip to content

Commit 98590cd

Browse files
author
Mikhail Bezoyan
committed
fixes
1 parent 7378099 commit 98590cd

13 files changed

+40
-25
lines changed

Gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ module.exports = function (grunt) {
173173
grunt.loadNpmTasks('grunt-contrib-uglify');
174174
grunt.loadNpmTasks('grunt-contrib-watch');
175175
grunt.loadNpmTasks('grunt-contrib-connect');
176+
grunt.loadNpmTasks('grunt-contrib-compress');
176177
grunt.loadNpmTasks('grunt-mxmlc');
177178
grunt.loadNpmTasks('grunt-curl');
178179
// Load custom QUnit task, based on grunt-contrib-qunit, but support "files" option.

custom-tasks/grunt-ok.js renamed to custom-tasks/Gruntfile-ok.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,16 @@ module.exports = function (grunt) {
3636
}
3737
});
3838

39+
grunt.config.set('compress.main', {
40+
options: {
41+
archive: '<%= pkg.name %>-<%= pkg.version.replace(/\\./g,"-") %>.zip'
42+
},
43+
files: [
44+
{cwd: 'dist/', expand: true, src: ['*'], dest: '<%= pkg.version.replace(/\\./g,"-") %>/'}
45+
]
46+
});
47+
48+
49+
grunt.registerTask('build-zip', ['build', 'compress']);
50+
3951
};

dist/FileAPI.flash.camera.swf

-1 Bytes
Binary file not shown.

dist/FileAPI.flash.image.swf

2 Bytes
Binary file not shown.

dist/FileAPI.flash.swf

-2 Bytes
Binary file not shown.

dist/FileAPI.html5.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.3 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.3b - BSD | git://github.com/mailru/FileAPI.git
22
* FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.
33
*/
44

@@ -201,7 +201,7 @@
201201
_elEvents[uid] = {};
202202
}
203203

204-
var isFileReader = FileReader !=null && el instanceof FileReader;
204+
var isFileReader = (FileReader && el) && (el instanceof FileReader);
205205
_each(type.split(/\s+/), function (type){
206206
if( jQuery && !isFileReader){
207207
jQuery.event.add(el, type, fn);
@@ -228,7 +228,7 @@
228228
if( el ){
229229
var uid = api.uid(el), events = _elEvents[uid] || {};
230230

231-
var isFileReader = FileReader != null && el instanceof FileReader;
231+
var isFileReader = (FileReader && el) && (el instanceof FileReader);
232232
_each(type.split(/\s+/), function (type){
233233
if( jQuery && !isFileReader){
234234
jQuery.event.remove(el, type, fn);
@@ -278,7 +278,7 @@
278278
* FileAPI (core object)
279279
*/
280280
api = {
281-
version: '2.0.3',
281+
version: '2.0.3b',
282282

283283
cors: false,
284284
html5: true,
@@ -2968,7 +2968,7 @@
29682968
xhr.send(slice);
29692969
}
29702970

2971-
xhr.send(slice);
2971+
// xhr.send(slice);
29722972
file = slice = null;
29732973
} else {
29742974
// single piece upload

dist/FileAPI.html5.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/FileAPI.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! FileAPI 2.0.3 - BSD | git://github.com/mailru/FileAPI.git
1+
/*! FileAPI 2.0.3b - BSD | git://github.com/mailru/FileAPI.git
22
* FileAPI — a set of javascript tools for working with files. Multiupload, drag'n'drop and chunked file upload. Images: crop, resize and auto orientation by EXIF.
33
*/
44

@@ -201,7 +201,7 @@
201201
_elEvents[uid] = {};
202202
}
203203

204-
var isFileReader = FileReader !=null && el instanceof FileReader;
204+
var isFileReader = (FileReader && el) && (el instanceof FileReader);
205205
_each(type.split(/\s+/), function (type){
206206
if( jQuery && !isFileReader){
207207
jQuery.event.add(el, type, fn);
@@ -228,7 +228,7 @@
228228
if( el ){
229229
var uid = api.uid(el), events = _elEvents[uid] || {};
230230

231-
var isFileReader = FileReader != null && el instanceof FileReader;
231+
var isFileReader = (FileReader && el) && (el instanceof FileReader);
232232
_each(type.split(/\s+/), function (type){
233233
if( jQuery && !isFileReader){
234234
jQuery.event.remove(el, type, fn);
@@ -278,7 +278,7 @@
278278
* FileAPI (core object)
279279
*/
280280
api = {
281-
version: '2.0.3',
281+
version: '2.0.3b',
282282

283283
cors: false,
284284
html5: true,
@@ -2968,7 +2968,7 @@
29682968
xhr.send(slice);
29692969
}
29702970

2971-
xhr.send(slice);
2971+
// xhr.send(slice);
29722972
file = slice = null;
29732973
} else {
29742974
// single piece upload
@@ -3859,7 +3859,7 @@
38593859
return this.parent.apply(this, arguments);
38603860
}
38613861
else {
3862-
api.log('FlashAPI.XHR._send: '+ flashId +' -> '+ fileId, JSON.stringify(files));
3862+
api.log('FlashAPI.XHR._send: '+ flashId +' -> '+ fileId);
38633863
}
38643864

38653865
_this.xhr = {
@@ -3878,7 +3878,7 @@
38783878
, callback: _wrap(function upload(evt){
38793879
var type = evt.type, result = evt.result;
38803880

3881-
api.log('FlashAPI.upload.'+type+':' + JSON.stringify(evt));
3881+
api.log('FlashAPI.upload.'+type);
38823882

38833883
if( type == 'progress' ){
38843884
evt.loaded = Math.min(evt.loaded, evt.total); // @todo fixme

dist/FileAPI.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/FileAPI.Flash.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@
565565
return this.parent.apply(this, arguments);
566566
}
567567
else {
568-
api.log('FlashAPI.XHR._send: '+ flashId +' -> '+ fileId, JSON.stringify(files));
568+
api.log('FlashAPI.XHR._send: '+ flashId +' -> '+ fileId);
569569
}
570570

571571
_this.xhr = {
@@ -584,7 +584,7 @@
584584
, callback: _wrap(function upload(evt){
585585
var type = evt.type, result = evt.result;
586586

587-
api.log('FlashAPI.upload.'+type+':' + JSON.stringify(evt));
587+
api.log('FlashAPI.upload.'+type);
588588

589589
if( type == 'progress' ){
590590
evt.loaded = Math.min(evt.loaded, evt.total); // @todo fixme

0 commit comments

Comments
 (0)