ezdz-rails 0.4.1 → 0.4.2

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: df5e3f3a1a7988ed0a63ee3568e52edc3baf923b
4
- data.tar.gz: 226abe3c7b4c5945af0e00def0a20ad1424d8316
3
+ metadata.gz: b5e5d032009840fea60e00d63f1b044cdaa21de7
4
+ data.tar.gz: d9727623474f9bc97ae4c45bb6a6b6d04122d329
5
5
  SHA512:
6
- metadata.gz: a27c638d0dda00665e602a99e4905de823dd881fc9658130d65ecef5a47d75e687ab7a6cee31df82c6b123aa53afeca94606eaac422ad385f4f867f7ce1c2e2f
7
- data.tar.gz: df825dfa22372694b059ed9276f3dc440887c7db4e318300901ef07d6fd3d4a917c642e2c3a5c0f1e83622da920e4b2229a891bcd7ad2be8978ca47cfa3e046a
6
+ metadata.gz: 4656d2357c3b9b67e4e8946d6b2f0d6c0e78d60b4932c445ae53c693b173d2488f8471e31fd00d9f497a7928f6b282db548056c0b0a770cc0a2f5b393e5f7755
7
+ data.tar.gz: ca64f1d61bcb3ed755b7b7e83350245999af0cff091751012dd799defa9e0d34bf110f2d88ec3c64ac211375a35c15688c26efbf1997c0c7a30d0e5537cf79a0
@@ -1,5 +1,5 @@
1
1
  module Ezdz
2
2
  module Rails
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  // Ezdz [izy-dizy]
3
- // v0.4.1 - released 2014-07-15 12:58
3
+ // v0.4.2 - released 2014-10-20 13:45
4
4
  // Licensed under the MIT license.
5
5
  // https://github.com/jaysalvat/ezdz
6
6
  // ----------------------------------------------------------------------------
@@ -8,7 +8,11 @@
8
8
  // http://jaysalvat.com/
9
9
  // ---------------------------------------------------------------------------*/
10
10
 
11
+ /* global define: true, require: true, jQuery */
12
+
11
13
  (function (factory) {
14
+ "use strict";
15
+
12
16
  if (typeof define === 'function' && define.amd) {
13
17
  define(['jquery'], factory);
14
18
  } else if (typeof exports === 'object') {
@@ -17,6 +21,8 @@
17
21
  factory(jQuery);
18
22
  }
19
23
  }(function ($) {
24
+ "use strict";
25
+
20
26
  // Default settings
21
27
  var defaults = {
22
28
  className: '',
@@ -139,8 +145,8 @@
139
145
 
140
146
  // Mime-Types
141
147
  var allowed = $input.attr('accept'),
142
- accepted = false;
143
- valid = true;
148
+ accepted = false,
149
+ valid = true,
144
150
  errors = {
145
151
  'mimeType': false,
146
152
  'maxSize': false,
@@ -159,7 +165,7 @@
159
165
  $.each(types, function(i, type) {
160
166
  type = $.trim(type);
161
167
 
162
- if (file.type == type) {
168
+ if (file.type === type) {
163
169
  accepted = true;
164
170
  return false;
165
171
  }
@@ -224,7 +230,7 @@
224
230
  file.width = img.width;
225
231
  file.height = img.height;
226
232
 
227
- if (settings.validators.width && img.width != settings.validators.width) {
233
+ if (settings.validators.width && img.width !== settings.validators.width) {
228
234
  valid = false;
229
235
  errors.width = true;
230
236
  }
@@ -239,7 +245,7 @@
239
245
  errors.minWidth = true;
240
246
  }
241
247
 
242
- if (settings.validators.height && img.height != settings.validators.height) {
248
+ if (settings.validators.height && img.height !== settings.validators.height) {
243
249
  valid = false;
244
250
  errors.height = true;
245
251
  }
@@ -294,7 +300,7 @@
294
300
  $.ezdz.prototype.preview = function(path, callback) {
295
301
  var settings = this.settings,
296
302
  $input = this.$input,
297
- $ezdz = $input.parent('.' + settings.classes.main);
303
+ $ezdz = $input.parent('.' + settings.classes.main),
298
304
  basename = path.replace(/\\/g,'/').replace( /.*\//, ''),
299
305
  formatted = settings.format(basename);
300
306
 
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  // Ezdz [izy-dizy]
3
- // v0.4.1 - released 2014-07-15 12:58
3
+ // v0.4.2 - released 2014-10-20 13:45
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.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedr Browne