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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5e5d032009840fea60e00d63f1b044cdaa21de7
|
4
|
+
data.tar.gz: d9727623474f9bc97ae4c45bb6a6b6d04122d329
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4656d2357c3b9b67e4e8946d6b2f0d6c0e78d60b4932c445ae53c693b173d2488f8471e31fd00d9f497a7928f6b282db548056c0b0a770cc0a2f5b393e5f7755
|
7
|
+
data.tar.gz: ca64f1d61bcb3ed755b7b7e83350245999af0cff091751012dd799defa9e0d34bf110f2d88ec3c64ac211375a35c15688c26efbf1997c0c7a30d0e5537cf79a0
|
data/lib/ezdz-rails/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
// Ezdz [izy-dizy]
|
3
|
-
// v0.4.
|
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
|
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
|
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
|
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.
|
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
|
// ----------------------------------------------------------------------------
|