jquery.fileupload-rails 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ba3def84aaf253857ac5d6b97d5ec7972b06e17
4
- data.tar.gz: 7d6ab39c52a6023a6d4e274ec7f05793e85d8600
3
+ metadata.gz: 7cca8c58440761214ca0bcf5b7f9e749fc2d41c2
4
+ data.tar.gz: 46398297b8969119d753de52fa3e49f95913c0cf
5
5
  SHA512:
6
- metadata.gz: cf1b23d3b4cd589c30adb6f080871f859ab0d02652ad9818bef8c9719649636283bec25514c9d093272677da1d11470b583afc6b366c42e90c8ef86d5f64c1d7
7
- data.tar.gz: 00726559ee983ff61dbaca0cd99602d61675e0fd860d49a8e8d2d7d39d60f47725126aedf133563762cff8ad151e9a718faeee6f98d3cfe4760bb207e86b3f13
6
+ metadata.gz: 11caded24fac6c6ece7271fe6a378984306457e2570fcff9fb19010b9bed3e470b5b9debc6b8e42ba100a81705d14f60ecdd1948c44cfa49b16f7a32b94b247d
7
+ data.tar.gz: e5d8d6119281f61bd7040ef9ec7b41870ad92c94fe366987a33381fea51274ff8f62039404e7609b779c5bf9a42f0c56dccb5552d0466863c4a4809745cd8399
data/Readme.md CHANGED
@@ -39,6 +39,8 @@ If you downloaded jquery.ui assets into your project, delete them and use [jquer
39
39
 
40
40
  ## Changelog
41
41
 
42
+ 1.9.0. Core 5.41.0.
43
+
42
44
  1.8.1. Core 5.40.1.
43
45
 
44
46
  1.8.0. Core 5.40.0, updated demo app.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "jquery.fileupload-rails"
5
- s.version = "1.8.1"
5
+ s.version = "1.9.0"
6
6
  s.author = "Semyon Perepelitsa"
7
7
  s.email = "sema@sema.in"
8
8
  s.homepage = "https://github.com/semaperepelitsa/jquery.fileupload-rails"
@@ -2,7 +2,7 @@
2
2
  //= require jquery.iframe-transport
3
3
 
4
4
  /*
5
- * jQuery File Upload Plugin 5.40.1
5
+ * jQuery File Upload Plugin 5.41.0
6
6
  * https://github.com/blueimp/jQuery-File-Upload
7
7
  *
8
8
  * Copyright 2010, Sebastian Tschan
@@ -1018,8 +1018,11 @@
1018
1018
  return result;
1019
1019
  },
1020
1020
 
1021
- _replaceFileInput: function (input) {
1022
- var inputClone = input.clone(true);
1021
+ _replaceFileInput: function (data) {
1022
+ var input = data.fileInput,
1023
+ inputClone = input.clone(true);
1024
+ // Add a reference for the new cloned file input to the data argument:
1025
+ data.fileInputClone = inputClone;
1023
1026
  $('<form></form>').append(inputClone)[0].reset();
1024
1027
  // Detaching allows to insert the fileInput on another form
1025
1028
  // without loosing the file input value:
@@ -1055,7 +1058,25 @@
1055
1058
  // to be returned together in one set:
1056
1059
  dfd.resolve([e]);
1057
1060
  },
1058
- dirReader;
1061
+ successHandler = function (entries) {
1062
+ that._handleFileTreeEntries(
1063
+ entries,
1064
+ path + entry.name + '/'
1065
+ ).done(function (files) {
1066
+ dfd.resolve(files);
1067
+ }).fail(errorHandler);
1068
+ },
1069
+ readEntries = function () {
1070
+ dirReader.readEntries(function (results) {
1071
+ if (!results.length) {
1072
+ successHandler(entries);
1073
+ } else {
1074
+ entries = entries.concat(results);
1075
+ readEntries();
1076
+ }
1077
+ }, errorHandler);
1078
+ },
1079
+ dirReader, entries = [];
1059
1080
  path = path || '';
1060
1081
  if (entry.isFile) {
1061
1082
  if (entry._file) {
@@ -1070,14 +1091,7 @@
1070
1091
  }
1071
1092
  } else if (entry.isDirectory) {
1072
1093
  dirReader = entry.createReader();
1073
- dirReader.readEntries(function (entries) {
1074
- that._handleFileTreeEntries(
1075
- entries,
1076
- path + entry.name + '/'
1077
- ).done(function (files) {
1078
- dfd.resolve(files);
1079
- }).fail(errorHandler);
1080
- }, errorHandler);
1094
+ readEntries();
1081
1095
  } else {
1082
1096
  // Return an empy list for file system items
1083
1097
  // other than files or directories:
@@ -1179,7 +1193,7 @@
1179
1193
  this._getFileInputFiles(data.fileInput).always(function (files) {
1180
1194
  data.files = files;
1181
1195
  if (that.options.replaceFileInput) {
1182
- that._replaceFileInput(data.fileInput);
1196
+ that._replaceFileInput(data);
1183
1197
  }
1184
1198
  if (that._trigger(
1185
1199
  'change',
@@ -1404,7 +1418,8 @@
1404
1418
  return;
1405
1419
  }
1406
1420
  data.files = files;
1407
- jqXHR = that._onSend(null, data).then(
1421
+ jqXHR = that._onSend(null, data);
1422
+ jqXHR.then(
1408
1423
  function (result, textStatus, jqXHR) {
1409
1424
  dfd.resolve(result, textStatus, jqXHR);
1410
1425
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery.fileupload-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Semyon Perepelitsa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-08 00:00:00.000000000 Z
11
+ date: 2014-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties