ezdz-rails 0.2.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11892a10ef2af7031c2d3aa65e589a2c450003e4
4
- data.tar.gz: 92df16969845147fcb55f6fe5e9ed52a9d891a65
3
+ metadata.gz: 057839bb3ba845ab53cf6759d4448ad296220168
4
+ data.tar.gz: fd5a979e994addab3611dd1a9736485e057a8f47
5
5
  SHA512:
6
- metadata.gz: b19e4b806e5cdafb579e1aaf8a9b04a8636a4b944633750517d002a5cd9493c201c716a4cbe06cc103a8b69b56097874b66663576feb737a907137e0a6d81e37
7
- data.tar.gz: 73b78ca7dce27fbef6a5813bd2d6093ba0f6ac441ae754a8b80d606f9f679874a712f78aa268bedcf2138f8479fca2da96f271a6901ec48d537a34eb6479c94a
6
+ metadata.gz: 599fe131969b67cee1f95dff39b7c91834e42b60141ff4463485664e9ed97c006ceaba481807ee356cc8248d79cf86ceed48dacae4b9a78e57ec12b51b2be071
7
+ data.tar.gz: 06b2db42251c9c36221d67fb54882aec3190bbb7f745fe49801e560a98876991dee68c834c4753b72bd55b1dceec200fe2fde478c7b3b3a529fed33e82208da7
@@ -1,5 +1,5 @@
1
1
  module Ezdz
2
2
  module Rails
3
- VERSION = '0.2.1'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  // Ezdz [izy-dizy]
3
- // v0.2.1 - released 2013-10-16 00:41
3
+ // v0.4.0 - released 2013-10-22 14:08
4
4
  // Licensed under the MIT license.
5
5
  // https://github.com/jaysalvat/ezdz
6
6
  // ----------------------------------------------------------------------------
@@ -59,12 +59,11 @@
59
59
  $input = self.$input;
60
60
 
61
61
  if (!$input.is('input[type="file"]')) {
62
- $.error('Ezdz error - Must be apply to inputs type file.');
63
62
  return;
64
63
  }
65
64
 
66
65
  // Stop if not compatible with HTML5 file API
67
- if (!(window.File && window.FileList && window.FileReader)) {
66
+ if (!$.ezdz.isBrowserCompatible()) {
68
67
  return;
69
68
  }
70
69
 
@@ -283,7 +282,7 @@
283
282
  settings.reject.apply($input, [ file, errors ]);
284
283
  }
285
284
  }
286
- }, 1);
285
+ }, 250);
287
286
  };
288
287
  });
289
288
  };
@@ -352,8 +351,13 @@
352
351
  return $input.parent('.' + settings.classes.main);
353
352
  };
354
353
 
354
+ // Is browser compatible
355
+ $.ezdz.isBrowserCompatible = function() {
356
+ return !!(window.File && window.FileList && window.FileReader);
357
+ };
358
+
355
359
  // Default options
356
- $.ezdz.prototype.defaults = defaults;
360
+ $.ezdz.defaults = defaults;
357
361
 
358
362
  // jQuery plugin
359
363
  $.fn.ezdz = function(options) {
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  // Ezdz [izy-dizy]
3
- // v0.2.1 - released 2013-10-16 00:41
3
+ // v0.4.0 - released 2013-10-22 14:08
4
4
  // Licensed under the MIT license.
5
5
  // https://github.com/jaysalvat/ezdz
6
6
  // ----------------------------------------------------------------------------
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezdz-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedr Browne