dropzonejs-rails 0.5.3 → 0.7.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: 5b564afaefa616ea05e4048f2d27bab01c3a1a59
4
- data.tar.gz: 0e1ad197e1f78a8a6829ec70f19c7ca8b7dcec3e
3
+ metadata.gz: a73ec47cb1d0f54c8b345cf59ccd44bfdc0be776
4
+ data.tar.gz: 3deb54b4acc966d133284a5f87310ca750cb4543
5
5
  SHA512:
6
- metadata.gz: dd6e2bbcf7700d07fa404573d6ab8f89fca197d9a68c02dc24642e711eb2e05456b518b6eec4e91e2eef29f3f26a93d7553d2ba0bd07730198139823298a2dd1
7
- data.tar.gz: b163448d07c9c0563ab306eb17bdb3d45222b98b6c592555db03d52ec394aebd082e7857a8d183cbd5a286c33b176473020dc0c0d72ea74621368edf104c9f0d
6
+ metadata.gz: 1912186764bf9b5131794f51e6738020ecc2e8c23172ac51d494e5f30fa56c0d275e2fa4955a000c417a5333690cc46d4fbd28a3fb9868c3a2cb510d88f2b4f3
7
+ data.tar.gz: a82d54a6cf70f01ee29b49b08f7f0c699ec77d2d4e525f64e6b979e989cb3ada9168a22d622c38657edf6033896691815ef44b6fbb4b6b732cfdb0e1f6638e1d
data/README.md CHANGED
@@ -4,7 +4,11 @@ Integrate [Matias Meno's Dropzone](http://www.dropzonejs.com/) awesome file uplo
4
4
 
5
5
  ## Version
6
6
 
7
- The latest version of this gem bundles **Dropzone v3.12.0**.
7
+ The latest version of this gem bundles **Dropzone v4.0.0**.
8
+
9
+ ### Dropzone 3.x
10
+
11
+ If you depend on Dropzone's 3.x branch, you need to specify `gem 'dropzonejs-rails', '~> 0.6.0'` in your Gemfile, otherwise you'll get 4.x.
8
12
 
9
13
  ## Installation and usage
10
14
 
@@ -58,6 +62,8 @@ Go to [this secret place](https://github.com/ncuesta/dropzonejs-rails/issues).
58
62
 
59
63
  ## Changelog
60
64
 
65
+ * v0.7.0
66
+ * Updates Dropzone to the 4.x branch
61
67
  * v0.5.1
62
68
  * Moves assets to the `app/` directory so that Rails 4 adds them to the Sprockets
63
69
  pipeline. Kudos to @senny for pointing this out.
@@ -65,7 +71,7 @@ Go to [this secret place](https://github.com/ncuesta/dropzonejs-rails/issues).
65
71
 
66
72
  ## Licence (MIT)
67
73
 
68
- (c) Copyright 2013 José Nahuel Cuesta Luengo
74
+ (c) Copyright 2013-2015 José Nahuel Cuesta Luengo
69
75
 
70
76
  Permission is hereby granted, free of charge, to any person obtaining
71
77
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -14,17 +14,9 @@ require 'dropzonejs-rails'
14
14
  desc 'Get latest dropzone js build'
15
15
  task :get do
16
16
  puts "Fetching dropzone v#{DropzonejsRails::DROPZONE_VERSION}..."
17
-
18
17
  download_dropzone_file 'dropzone.js', 'app/assets/javascripts/dropzone.js'
19
- download_dropzone_file 'css/basic.css', 'app/assets/stylesheets/dropzone/basic.css.scss'
20
- download_dropzone_file 'css/dropzone.css', 'app/assets/stylesheets/dropzone/dropzone.css.scss'
21
- download_dropzone_file 'images/spritemap.png', 'app/assets/images/dropzone/spritemap.png'
22
- download_dropzone_file 'images/spritemap@2x.png', 'app/assets/images/dropzone/spritemap@2x.png'
23
-
24
- puts "Fixing image paths..."
25
- fix_image_links 'app/assets/stylesheets/dropzone/basic.css.scss'
26
- fix_image_links 'app/assets/stylesheets/dropzone/dropzone.css.scss'
27
-
18
+ download_dropzone_file 'basic.css', 'app/assets/stylesheets/dropzone/basic.scss'
19
+ download_dropzone_file 'dropzone.css', 'app/assets/stylesheets/dropzone/dropzone.scss'
28
20
  puts "Done"
29
21
  end
30
22
 
@@ -55,20 +47,12 @@ task bump: [:check, :get] do
55
47
  end
56
48
 
57
49
  def download_dropzone_file(source_file, target_file)
58
- source = "https://raw.github.com/enyo/dropzone/v#{DropzonejsRails::DROPZONE_VERSION}/downloads/#{source_file}"
50
+ source = "https://raw.githubusercontent.com/enyo/dropzone/v#{DropzonejsRails::DROPZONE_VERSION}/dist/#{source_file}"
59
51
  target = DropzonejsRails::Engine.root.join(target_file)
60
52
 
61
53
  File.open(target, 'wb+') { |f| f << open(source, 'rb').read }
62
54
  end
63
55
 
64
- def fix_image_links(css_file)
65
- file_name = DropzonejsRails::Engine.root.join(css_file)
66
- original_css = File.read(file_name)
67
- fixed_css = original_css.gsub(/url\(\"\.\.\/images\/(.+\.png)\"\)/, 'image-url("dropzone/\1")')
68
-
69
- File.open(file_name, 'w') { |file| file << fixed_css }
70
- end
71
-
72
56
  def sed(filename, replacements)
73
57
  contents = File.read(filename)
74
58
  replacements.each_pair do |pattern, replacement|
@@ -1,72 +1,4 @@
1
1
 
2
- ;(function(){
3
-
4
- /**
5
- * Require the module at `name`.
6
- *
7
- * @param {String} name
8
- * @return {Object} exports
9
- * @api public
10
- */
11
-
12
- function require(name) {
13
- var module = require.modules[name];
14
- if (!module) throw new Error('failed to require "' + name + '"');
15
-
16
- if (!('exports' in module) && typeof module.definition === 'function') {
17
- module.client = module.component = true;
18
- module.definition.call(this, module.exports = {}, module);
19
- delete module.definition;
20
- }
21
-
22
- return module.exports;
23
- }
24
-
25
- /**
26
- * Registered modules.
27
- */
28
-
29
- require.modules = {};
30
-
31
- /**
32
- * Register module at `name` with callback `definition`.
33
- *
34
- * @param {String} name
35
- * @param {Function} definition
36
- * @api private
37
- */
38
-
39
- require.register = function (name, definition) {
40
- require.modules[name] = {
41
- definition: definition
42
- };
43
- };
44
-
45
- /**
46
- * Define a module's exports immediately with `exports`.
47
- *
48
- * @param {String} name
49
- * @param {Generic} exports
50
- * @api private
51
- */
52
-
53
- require.define = function (name, exports) {
54
- require.modules[name] = {
55
- exports: exports
56
- };
57
- };
58
- require.register("dropzone", function (exports, module) {
59
-
60
-
61
- /**
62
- * Exposing dropzone
63
- */
64
- module.exports = require("dropzone/lib/dropzone.js");
65
-
66
- });
67
-
68
- require.register("dropzone/lib/dropzone.js", function (exports, module) {
69
-
70
2
  /*
71
3
  *
72
4
  * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
@@ -191,9 +123,11 @@ require.register("dropzone/lib/dropzone.js", function (exports, module) {
191
123
  paramName: "file",
192
124
  createImageThumbnails: true,
193
125
  maxThumbnailFilesize: 10,
194
- thumbnailWidth: 100,
195
- thumbnailHeight: 100,
126
+ thumbnailWidth: 120,
127
+ thumbnailHeight: 120,
128
+ filesizeBase: 1000,
196
129
  maxFiles: null,
130
+ filesizeBase: 1000,
197
131
  params: {},
198
132
  clickable: true,
199
133
  ignoreHiddenFiles: true,
@@ -370,18 +304,20 @@ require.register("dropzone/lib/dropzone.js", function (exports, module) {
370
304
  return this._updateMaxFilesReachedClass();
371
305
  },
372
306
  thumbnail: function(file, dataUrl) {
373
- var thumbnailElement, _i, _len, _ref, _results;
307
+ var thumbnailElement, _i, _len, _ref;
374
308
  if (file.previewElement) {
375
309
  file.previewElement.classList.remove("dz-file-preview");
376
- file.previewElement.classList.add("dz-image-preview");
377
310
  _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]");
378
- _results = [];
379
311
  for (_i = 0, _len = _ref.length; _i < _len; _i++) {
380
312
  thumbnailElement = _ref[_i];
381
313
  thumbnailElement.alt = file.name;
382
- _results.push(thumbnailElement.src = dataUrl);
314
+ thumbnailElement.src = dataUrl;
383
315
  }
384
- return _results;
316
+ return setTimeout(((function(_this) {
317
+ return function() {
318
+ return file.previewElement.classList.add("dz-image-preview");
319
+ };
320
+ })(this)), 1);
385
321
  }
386
322
  },
387
323
  error: function(file, message) {
@@ -441,14 +377,17 @@ require.register("dropzone/lib/dropzone.js", function (exports, module) {
441
377
  canceledmultiple: noop,
442
378
  complete: function(file) {
443
379
  if (file._removeLink) {
444
- return file._removeLink.textContent = this.options.dictRemoveFile;
380
+ file._removeLink.textContent = this.options.dictRemoveFile;
381
+ }
382
+ if (file.previewElement) {
383
+ return file.previewElement.classList.add("dz-complete");
445
384
  }
446
385
  },
447
386
  completemultiple: noop,
448
387
  maxfilesexceeded: noop,
449
388
  maxfilesreached: noop,
450
389
  queuecomplete: noop,
451
- previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-details\">\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n <div class=\"dz-size\" data-dz-size></div>\n <img data-dz-thumbnail />\n </div>\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n <div class=\"dz-success-mark\"><span>✔</span></div>\n <div class=\"dz-error-mark\"><span>✘</span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n</div>"
390
+ previewTemplate: "<div class=\"dz-preview dz-file-preview\">\n <div class=\"dz-image\"><img data-dz-thumbnail /></div>\n <div class=\"dz-details\">\n <div class=\"dz-size\"><span data-dz-size></span></div>\n <div class=\"dz-filename\"><span data-dz-name></span></div>\n </div>\n <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n <div class=\"dz-success-mark\">\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Check</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></path>\n </g>\n </svg>\n </div>\n <div class=\"dz-error-mark\">\n <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n <title>Error</title>\n <defs></defs>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\">\n <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\n </g>\n </g>\n </svg>\n </div>\n</div>"
452
391
  };
453
392
 
454
393
  extend = function() {
@@ -874,24 +813,20 @@ require.register("dropzone/lib/dropzone.js", function (exports, module) {
874
813
  };
875
814
 
876
815
  Dropzone.prototype.filesize = function(size) {
877
- var string;
878
- if (size >= 1024 * 1024 * 1024 * 1024 / 10) {
879
- size = size / (1024 * 1024 * 1024 * 1024 / 10);
880
- string = "TiB";
881
- } else if (size >= 1024 * 1024 * 1024 / 10) {
882
- size = size / (1024 * 1024 * 1024 / 10);
883
- string = "GiB";
884
- } else if (size >= 1024 * 1024 / 10) {
885
- size = size / (1024 * 1024 / 10);
886
- string = "MiB";
887
- } else if (size >= 1024 / 10) {
888
- size = size / (1024 / 10);
889
- string = "KiB";
890
- } else {
891
- size = size * 10;
892
- string = "b";
816
+ var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;
817
+ units = ['TB', 'GB', 'MB', 'KB', 'b'];
818
+ selectedSize = selectedUnit = null;
819
+ for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {
820
+ unit = units[i];
821
+ cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
822
+ if (size >= cutoff) {
823
+ selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
824
+ selectedUnit = unit;
825
+ break;
826
+ }
893
827
  }
894
- return "<strong>" + (Math.round(size) / 10) + "</strong> " + string;
828
+ selectedSize = Math.round(10 * selectedSize) / 10;
829
+ return "<strong>" + selectedSize + "</strong> " + selectedUnit;
895
830
  };
896
831
 
897
832
  Dropzone.prototype._updateMaxFilesReachedClass = function() {
@@ -1150,6 +1085,7 @@ require.register("dropzone/lib/dropzone.js", function (exports, module) {
1150
1085
  return callback();
1151
1086
  }
1152
1087
  };
1088
+ img.onerror = callback;
1153
1089
  return img.src = fileReader.result;
1154
1090
  };
1155
1091
  })(this);
@@ -1441,7 +1377,7 @@ require.register("dropzone/lib/dropzone.js", function (exports, module) {
1441
1377
 
1442
1378
  })(Emitter);
1443
1379
 
1444
- Dropzone.version = "3.12.0";
1380
+ Dropzone.version = "4.0.0";
1445
1381
 
1446
1382
  Dropzone.options = {};
1447
1383
 
@@ -1782,14 +1718,3 @@ require.register("dropzone/lib/dropzone.js", function (exports, module) {
1782
1718
  contentLoaded(window, Dropzone._autoDiscoverFunction);
1783
1719
 
1784
1720
  }).call(this);
1785
-
1786
- });
1787
-
1788
- if (typeof exports == "object") {
1789
- module.exports = require("dropzone");
1790
- } else if (typeof define == "function" && define.amd) {
1791
- define([], function(){ return require("dropzone"); });
1792
- } else {
1793
- this["Dropzone"] = require("dropzone");
1794
- }
1795
- })()
@@ -0,0 +1,39 @@
1
+ /*
2
+ * The MIT License
3
+ * Copyright (c) 2012 Matias Meno <m@tias.me>
4
+ */
5
+ .dropzone, .dropzone * {
6
+ box-sizing: border-box; }
7
+
8
+ .dropzone {
9
+ position: relative; }
10
+ .dropzone .dz-preview {
11
+ position: relative;
12
+ display: inline-block;
13
+ width: 120px;
14
+ margin: 0.5em; }
15
+ .dropzone .dz-preview .dz-progress {
16
+ display: block;
17
+ height: 15px;
18
+ border: 1px solid #aaa; }
19
+ .dropzone .dz-preview .dz-progress .dz-upload {
20
+ display: block;
21
+ height: 100%;
22
+ width: 0;
23
+ background: green; }
24
+ .dropzone .dz-preview .dz-error-message {
25
+ color: red;
26
+ display: none; }
27
+ .dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark {
28
+ display: block; }
29
+ .dropzone .dz-preview.dz-success .dz-success-mark {
30
+ display: block; }
31
+ .dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark {
32
+ position: absolute;
33
+ display: none;
34
+ left: 30px;
35
+ top: 30px;
36
+ width: 54px;
37
+ height: 58px;
38
+ left: 50%;
39
+ margin-left: -27px; }
@@ -0,0 +1,388 @@
1
+ /*
2
+ * The MIT License
3
+ * Copyright (c) 2012 Matias Meno <m@tias.me>
4
+ */
5
+ @-webkit-keyframes passing-through {
6
+ 0% {
7
+ opacity: 0;
8
+ -webkit-transform: translateY(40px);
9
+ -moz-transform: translateY(40px);
10
+ -ms-transform: translateY(40px);
11
+ -o-transform: translateY(40px);
12
+ transform: translateY(40px); }
13
+ 30%, 70% {
14
+ opacity: 1;
15
+ -webkit-transform: translateY(0px);
16
+ -moz-transform: translateY(0px);
17
+ -ms-transform: translateY(0px);
18
+ -o-transform: translateY(0px);
19
+ transform: translateY(0px); }
20
+ 100% {
21
+ opacity: 0;
22
+ -webkit-transform: translateY(-40px);
23
+ -moz-transform: translateY(-40px);
24
+ -ms-transform: translateY(-40px);
25
+ -o-transform: translateY(-40px);
26
+ transform: translateY(-40px); } }
27
+ @-moz-keyframes passing-through {
28
+ 0% {
29
+ opacity: 0;
30
+ -webkit-transform: translateY(40px);
31
+ -moz-transform: translateY(40px);
32
+ -ms-transform: translateY(40px);
33
+ -o-transform: translateY(40px);
34
+ transform: translateY(40px); }
35
+ 30%, 70% {
36
+ opacity: 1;
37
+ -webkit-transform: translateY(0px);
38
+ -moz-transform: translateY(0px);
39
+ -ms-transform: translateY(0px);
40
+ -o-transform: translateY(0px);
41
+ transform: translateY(0px); }
42
+ 100% {
43
+ opacity: 0;
44
+ -webkit-transform: translateY(-40px);
45
+ -moz-transform: translateY(-40px);
46
+ -ms-transform: translateY(-40px);
47
+ -o-transform: translateY(-40px);
48
+ transform: translateY(-40px); } }
49
+ @keyframes passing-through {
50
+ 0% {
51
+ opacity: 0;
52
+ -webkit-transform: translateY(40px);
53
+ -moz-transform: translateY(40px);
54
+ -ms-transform: translateY(40px);
55
+ -o-transform: translateY(40px);
56
+ transform: translateY(40px); }
57
+ 30%, 70% {
58
+ opacity: 1;
59
+ -webkit-transform: translateY(0px);
60
+ -moz-transform: translateY(0px);
61
+ -ms-transform: translateY(0px);
62
+ -o-transform: translateY(0px);
63
+ transform: translateY(0px); }
64
+ 100% {
65
+ opacity: 0;
66
+ -webkit-transform: translateY(-40px);
67
+ -moz-transform: translateY(-40px);
68
+ -ms-transform: translateY(-40px);
69
+ -o-transform: translateY(-40px);
70
+ transform: translateY(-40px); } }
71
+ @-webkit-keyframes slide-in {
72
+ 0% {
73
+ opacity: 0;
74
+ -webkit-transform: translateY(40px);
75
+ -moz-transform: translateY(40px);
76
+ -ms-transform: translateY(40px);
77
+ -o-transform: translateY(40px);
78
+ transform: translateY(40px); }
79
+ 30% {
80
+ opacity: 1;
81
+ -webkit-transform: translateY(0px);
82
+ -moz-transform: translateY(0px);
83
+ -ms-transform: translateY(0px);
84
+ -o-transform: translateY(0px);
85
+ transform: translateY(0px); } }
86
+ @-moz-keyframes slide-in {
87
+ 0% {
88
+ opacity: 0;
89
+ -webkit-transform: translateY(40px);
90
+ -moz-transform: translateY(40px);
91
+ -ms-transform: translateY(40px);
92
+ -o-transform: translateY(40px);
93
+ transform: translateY(40px); }
94
+ 30% {
95
+ opacity: 1;
96
+ -webkit-transform: translateY(0px);
97
+ -moz-transform: translateY(0px);
98
+ -ms-transform: translateY(0px);
99
+ -o-transform: translateY(0px);
100
+ transform: translateY(0px); } }
101
+ @keyframes slide-in {
102
+ 0% {
103
+ opacity: 0;
104
+ -webkit-transform: translateY(40px);
105
+ -moz-transform: translateY(40px);
106
+ -ms-transform: translateY(40px);
107
+ -o-transform: translateY(40px);
108
+ transform: translateY(40px); }
109
+ 30% {
110
+ opacity: 1;
111
+ -webkit-transform: translateY(0px);
112
+ -moz-transform: translateY(0px);
113
+ -ms-transform: translateY(0px);
114
+ -o-transform: translateY(0px);
115
+ transform: translateY(0px); } }
116
+ @-webkit-keyframes pulse {
117
+ 0% {
118
+ -webkit-transform: scale(1);
119
+ -moz-transform: scale(1);
120
+ -ms-transform: scale(1);
121
+ -o-transform: scale(1);
122
+ transform: scale(1); }
123
+ 10% {
124
+ -webkit-transform: scale(1.1);
125
+ -moz-transform: scale(1.1);
126
+ -ms-transform: scale(1.1);
127
+ -o-transform: scale(1.1);
128
+ transform: scale(1.1); }
129
+ 20% {
130
+ -webkit-transform: scale(1);
131
+ -moz-transform: scale(1);
132
+ -ms-transform: scale(1);
133
+ -o-transform: scale(1);
134
+ transform: scale(1); } }
135
+ @-moz-keyframes pulse {
136
+ 0% {
137
+ -webkit-transform: scale(1);
138
+ -moz-transform: scale(1);
139
+ -ms-transform: scale(1);
140
+ -o-transform: scale(1);
141
+ transform: scale(1); }
142
+ 10% {
143
+ -webkit-transform: scale(1.1);
144
+ -moz-transform: scale(1.1);
145
+ -ms-transform: scale(1.1);
146
+ -o-transform: scale(1.1);
147
+ transform: scale(1.1); }
148
+ 20% {
149
+ -webkit-transform: scale(1);
150
+ -moz-transform: scale(1);
151
+ -ms-transform: scale(1);
152
+ -o-transform: scale(1);
153
+ transform: scale(1); } }
154
+ @keyframes pulse {
155
+ 0% {
156
+ -webkit-transform: scale(1);
157
+ -moz-transform: scale(1);
158
+ -ms-transform: scale(1);
159
+ -o-transform: scale(1);
160
+ transform: scale(1); }
161
+ 10% {
162
+ -webkit-transform: scale(1.1);
163
+ -moz-transform: scale(1.1);
164
+ -ms-transform: scale(1.1);
165
+ -o-transform: scale(1.1);
166
+ transform: scale(1.1); }
167
+ 20% {
168
+ -webkit-transform: scale(1);
169
+ -moz-transform: scale(1);
170
+ -ms-transform: scale(1);
171
+ -o-transform: scale(1);
172
+ transform: scale(1); } }
173
+ .dropzone, .dropzone * {
174
+ box-sizing: border-box; }
175
+
176
+ .dropzone {
177
+ min-height: 150px;
178
+ border: 2px solid rgba(0, 0, 0, 0.3);
179
+ background: white;
180
+ padding: 20px 20px; }
181
+ .dropzone.dz-clickable {
182
+ cursor: pointer; }
183
+ .dropzone.dz-clickable * {
184
+ cursor: default; }
185
+ .dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * {
186
+ cursor: pointer; }
187
+ .dropzone.dz-started .dz-message {
188
+ display: none; }
189
+ .dropzone.dz-drag-hover {
190
+ border-style: solid; }
191
+ .dropzone.dz-drag-hover .dz-message {
192
+ opacity: 0.5; }
193
+ .dropzone .dz-message {
194
+ text-align: center;
195
+ margin: 2em 0; }
196
+ .dropzone .dz-preview {
197
+ position: relative;
198
+ display: inline-block;
199
+ vertical-align: top;
200
+ margin: 16px;
201
+ min-height: 100px; }
202
+ .dropzone .dz-preview:hover {
203
+ z-index: 1000; }
204
+ .dropzone .dz-preview:hover .dz-details {
205
+ opacity: 1; }
206
+ .dropzone .dz-preview.dz-file-preview .dz-image {
207
+ border-radius: 20px;
208
+ background: #999;
209
+ background: linear-gradient(to bottom, #eee, #ddd); }
210
+ .dropzone .dz-preview.dz-file-preview .dz-details {
211
+ opacity: 1; }
212
+ .dropzone .dz-preview.dz-image-preview {
213
+ background: white; }
214
+ .dropzone .dz-preview.dz-image-preview .dz-details {
215
+ -webkit-transition: opacity 0.2s linear;
216
+ -moz-transition: opacity 0.2s linear;
217
+ -ms-transition: opacity 0.2s linear;
218
+ -o-transition: opacity 0.2s linear;
219
+ transition: opacity 0.2s linear; }
220
+ .dropzone .dz-preview .dz-remove {
221
+ font-size: 14px;
222
+ text-align: center;
223
+ display: block;
224
+ cursor: pointer;
225
+ border: none; }
226
+ .dropzone .dz-preview .dz-remove:hover {
227
+ text-decoration: underline; }
228
+ .dropzone .dz-preview:hover .dz-details {
229
+ opacity: 1; }
230
+ .dropzone .dz-preview .dz-details {
231
+ z-index: 20;
232
+ position: absolute;
233
+ top: 0;
234
+ left: 0;
235
+ opacity: 0;
236
+ font-size: 13px;
237
+ min-width: 100%;
238
+ max-width: 100%;
239
+ padding: 2em 1em;
240
+ text-align: center;
241
+ color: rgba(0, 0, 0, 0.9);
242
+ line-height: 150%; }
243
+ .dropzone .dz-preview .dz-details .dz-size {
244
+ margin-bottom: 1em;
245
+ font-size: 16px; }
246
+ .dropzone .dz-preview .dz-details .dz-filename {
247
+ white-space: nowrap; }
248
+ .dropzone .dz-preview .dz-details .dz-filename:hover span {
249
+ border: 1px solid rgba(200, 200, 200, 0.8);
250
+ background-color: rgba(255, 255, 255, 0.8); }
251
+ .dropzone .dz-preview .dz-details .dz-filename:not(:hover) {
252
+ overflow: hidden;
253
+ text-overflow: ellipsis; }
254
+ .dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
255
+ border: 1px solid transparent; }
256
+ .dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
257
+ background-color: rgba(255, 255, 255, 0.4);
258
+ padding: 0 0.4em;
259
+ border-radius: 3px; }
260
+ .dropzone .dz-preview:hover .dz-image img {
261
+ -webkit-transform: scale(1.05, 1.05);
262
+ -moz-transform: scale(1.05, 1.05);
263
+ -ms-transform: scale(1.05, 1.05);
264
+ -o-transform: scale(1.05, 1.05);
265
+ transform: scale(1.05, 1.05);
266
+ -webkit-filter: blur(8px);
267
+ filter: blur(8px); }
268
+ .dropzone .dz-preview .dz-image {
269
+ border-radius: 20px;
270
+ overflow: hidden;
271
+ width: 120px;
272
+ height: 120px;
273
+ position: relative;
274
+ display: block;
275
+ z-index: 10; }
276
+ .dropzone .dz-preview .dz-image img {
277
+ display: block; }
278
+ .dropzone .dz-preview.dz-success .dz-success-mark {
279
+ -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
280
+ -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
281
+ -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
282
+ -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
283
+ animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); }
284
+ .dropzone .dz-preview.dz-error .dz-error-mark {
285
+ opacity: 1;
286
+ -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
287
+ -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
288
+ -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
289
+ -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
290
+ animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); }
291
+ .dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
292
+ pointer-events: none;
293
+ opacity: 0;
294
+ z-index: 500;
295
+ position: absolute;
296
+ display: block;
297
+ top: 50%;
298
+ left: 50%;
299
+ margin-left: -27px;
300
+ margin-top: -27px; }
301
+ .dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {
302
+ display: block;
303
+ width: 54px;
304
+ height: 54px; }
305
+ .dropzone .dz-preview.dz-processing .dz-progress {
306
+ opacity: 1;
307
+ -webkit-transition: all 0.2s linear;
308
+ -moz-transition: all 0.2s linear;
309
+ -ms-transition: all 0.2s linear;
310
+ -o-transition: all 0.2s linear;
311
+ transition: all 0.2s linear; }
312
+ .dropzone .dz-preview.dz-complete .dz-progress {
313
+ opacity: 0;
314
+ -webkit-transition: opacity 0.4s ease-in;
315
+ -moz-transition: opacity 0.4s ease-in;
316
+ -ms-transition: opacity 0.4s ease-in;
317
+ -o-transition: opacity 0.4s ease-in;
318
+ transition: opacity 0.4s ease-in; }
319
+ .dropzone .dz-preview:not(.dz-processing) .dz-progress {
320
+ -webkit-animation: pulse 6s ease infinite;
321
+ -moz-animation: pulse 6s ease infinite;
322
+ -ms-animation: pulse 6s ease infinite;
323
+ -o-animation: pulse 6s ease infinite;
324
+ animation: pulse 6s ease infinite; }
325
+ .dropzone .dz-preview .dz-progress {
326
+ opacity: 1;
327
+ z-index: 1000;
328
+ pointer-events: none;
329
+ position: absolute;
330
+ height: 16px;
331
+ left: 50%;
332
+ top: 50%;
333
+ margin-top: -8px;
334
+ width: 80px;
335
+ margin-left: -40px;
336
+ background: rgba(255, 255, 255, 0.9);
337
+ -webkit-transform: scale(1);
338
+ border-radius: 8px;
339
+ overflow: hidden; }
340
+ .dropzone .dz-preview .dz-progress .dz-upload {
341
+ background: #333;
342
+ background: linear-gradient(to bottom, #666, #444);
343
+ position: absolute;
344
+ top: 0;
345
+ left: 0;
346
+ bottom: 0;
347
+ width: 0;
348
+ -webkit-transition: width 300ms ease-in-out;
349
+ -moz-transition: width 300ms ease-in-out;
350
+ -ms-transition: width 300ms ease-in-out;
351
+ -o-transition: width 300ms ease-in-out;
352
+ transition: width 300ms ease-in-out; }
353
+ .dropzone .dz-preview.dz-error .dz-error-message {
354
+ display: block; }
355
+ .dropzone .dz-preview.dz-error:hover .dz-error-message {
356
+ opacity: 1;
357
+ pointer-events: auto; }
358
+ .dropzone .dz-preview .dz-error-message {
359
+ pointer-events: none;
360
+ z-index: 1000;
361
+ position: absolute;
362
+ display: block;
363
+ display: none;
364
+ opacity: 0;
365
+ -webkit-transition: opacity 0.3s ease;
366
+ -moz-transition: opacity 0.3s ease;
367
+ -ms-transition: opacity 0.3s ease;
368
+ -o-transition: opacity 0.3s ease;
369
+ transition: opacity 0.3s ease;
370
+ border-radius: 8px;
371
+ font-size: 13px;
372
+ top: 130px;
373
+ left: -10px;
374
+ width: 140px;
375
+ background: #be2626;
376
+ background: linear-gradient(to bottom, #be2626, #a92222);
377
+ padding: 0.5em 1.2em;
378
+ color: white; }
379
+ .dropzone .dz-preview .dz-error-message:after {
380
+ content: '';
381
+ position: absolute;
382
+ top: -6px;
383
+ left: 64px;
384
+ width: 0;
385
+ height: 0;
386
+ border-left: 6px solid transparent;
387
+ border-right: 6px solid transparent;
388
+ border-bottom: 6px solid #be2626; }
@@ -1,4 +1,4 @@
1
1
  module DropzonejsRails
2
- VERSION = '0.5.3'
3
- DROPZONE_VERSION = '3.12.0'
2
+ VERSION = '0.7.0'
3
+ DROPZONE_VERSION = '4.0.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dropzonejs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Nahuel Cuesta Luengo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-16 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit
@@ -63,11 +63,9 @@ files:
63
63
  - LICENSE
64
64
  - README.md
65
65
  - Rakefile
66
- - app/assets/images/dropzone/spritemap.png
67
- - app/assets/images/dropzone/spritemap@2x.png
68
66
  - app/assets/javascripts/dropzone.js
69
- - app/assets/stylesheets/dropzone/basic.css.scss
70
- - app/assets/stylesheets/dropzone/dropzone.css.scss
67
+ - app/assets/stylesheets/dropzone/basic.scss
68
+ - app/assets/stylesheets/dropzone/dropzone.scss
71
69
  - lib/dropzonejs-rails.rb
72
70
  - lib/dropzonejs-rails/engine.rb
73
71
  - lib/dropzonejs-rails/version.rb
@@ -1,155 +0,0 @@
1
- /* The MIT License */
2
- .dropzone,
3
- .dropzone *,
4
- .dropzone-previews,
5
- .dropzone-previews * {
6
- -webkit-box-sizing: border-box;
7
- -moz-box-sizing: border-box;
8
- box-sizing: border-box;
9
- }
10
- .dropzone {
11
- position: relative;
12
- border: 1px solid rgba(0,0,0,0.08);
13
- background: rgba(0,0,0,0.02);
14
- padding: 1em;
15
- }
16
- .dropzone.dz-clickable {
17
- cursor: pointer;
18
- }
19
- .dropzone.dz-clickable .dz-message,
20
- .dropzone.dz-clickable .dz-message span {
21
- cursor: pointer;
22
- }
23
- .dropzone.dz-clickable * {
24
- cursor: default;
25
- }
26
- .dropzone .dz-message {
27
- opacity: 1;
28
- -ms-filter: none;
29
- filter: none;
30
- }
31
- .dropzone.dz-drag-hover {
32
- border-color: rgba(0,0,0,0.15);
33
- background: rgba(0,0,0,0.04);
34
- }
35
- .dropzone.dz-started .dz-message {
36
- display: none;
37
- }
38
- .dropzone .dz-preview,
39
- .dropzone-previews .dz-preview {
40
- background: rgba(255,255,255,0.8);
41
- position: relative;
42
- display: inline-block;
43
- margin: 17px;
44
- vertical-align: top;
45
- border: 1px solid #acacac;
46
- padding: 6px 6px 6px 6px;
47
- }
48
- .dropzone .dz-preview.dz-file-preview [data-dz-thumbnail],
49
- .dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] {
50
- display: none;
51
- }
52
- .dropzone .dz-preview .dz-details,
53
- .dropzone-previews .dz-preview .dz-details {
54
- width: 100px;
55
- height: 100px;
56
- position: relative;
57
- background: #ebebeb;
58
- padding: 5px;
59
- margin-bottom: 22px;
60
- }
61
- .dropzone .dz-preview .dz-details .dz-filename,
62
- .dropzone-previews .dz-preview .dz-details .dz-filename {
63
- overflow: hidden;
64
- height: 100%;
65
- }
66
- .dropzone .dz-preview .dz-details img,
67
- .dropzone-previews .dz-preview .dz-details img {
68
- position: absolute;
69
- top: 0;
70
- left: 0;
71
- width: 100px;
72
- height: 100px;
73
- }
74
- .dropzone .dz-preview .dz-details .dz-size,
75
- .dropzone-previews .dz-preview .dz-details .dz-size {
76
- position: absolute;
77
- bottom: -28px;
78
- left: 3px;
79
- height: 28px;
80
- line-height: 28px;
81
- }
82
- .dropzone .dz-preview.dz-error .dz-error-mark,
83
- .dropzone-previews .dz-preview.dz-error .dz-error-mark {
84
- display: block;
85
- }
86
- .dropzone .dz-preview.dz-success .dz-success-mark,
87
- .dropzone-previews .dz-preview.dz-success .dz-success-mark {
88
- display: block;
89
- }
90
- .dropzone .dz-preview:hover .dz-details img,
91
- .dropzone-previews .dz-preview:hover .dz-details img {
92
- display: none;
93
- }
94
- .dropzone .dz-preview .dz-success-mark,
95
- .dropzone-previews .dz-preview .dz-success-mark,
96
- .dropzone .dz-preview .dz-error-mark,
97
- .dropzone-previews .dz-preview .dz-error-mark {
98
- display: none;
99
- position: absolute;
100
- width: 40px;
101
- height: 40px;
102
- font-size: 30px;
103
- text-align: center;
104
- right: -10px;
105
- top: -10px;
106
- }
107
- .dropzone .dz-preview .dz-success-mark,
108
- .dropzone-previews .dz-preview .dz-success-mark {
109
- color: #8cc657;
110
- }
111
- .dropzone .dz-preview .dz-error-mark,
112
- .dropzone-previews .dz-preview .dz-error-mark {
113
- color: #ee162d;
114
- }
115
- .dropzone .dz-preview .dz-progress,
116
- .dropzone-previews .dz-preview .dz-progress {
117
- position: absolute;
118
- top: 100px;
119
- left: 6px;
120
- right: 6px;
121
- height: 6px;
122
- background: #d7d7d7;
123
- display: none;
124
- }
125
- .dropzone .dz-preview .dz-progress .dz-upload,
126
- .dropzone-previews .dz-preview .dz-progress .dz-upload {
127
- display: block;
128
- position: absolute;
129
- top: 0;
130
- bottom: 0;
131
- left: 0;
132
- width: 0%;
133
- background-color: #8cc657;
134
- }
135
- .dropzone .dz-preview.dz-processing .dz-progress,
136
- .dropzone-previews .dz-preview.dz-processing .dz-progress {
137
- display: block;
138
- }
139
- .dropzone .dz-preview .dz-error-message,
140
- .dropzone-previews .dz-preview .dz-error-message {
141
- display: none;
142
- position: absolute;
143
- top: -5px;
144
- left: -20px;
145
- background: rgba(245,245,245,0.8);
146
- padding: 8px 10px;
147
- color: #800;
148
- min-width: 140px;
149
- max-width: 500px;
150
- z-index: 500;
151
- }
152
- .dropzone .dz-preview:hover.dz-error .dz-error-message,
153
- .dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
154
- display: block;
155
- }
@@ -1,387 +0,0 @@
1
- /* The MIT License */
2
- .dropzone,
3
- .dropzone *,
4
- .dropzone-previews,
5
- .dropzone-previews * {
6
- box-sizing: border-box;
7
- }
8
- .dropzone {
9
- position: relative;
10
- border: 1px solid rgba(0,0,0,0.08);
11
- background: rgba(0,0,0,0.02);
12
- padding: 1em;
13
- }
14
- .dropzone.dz-clickable {
15
- cursor: pointer;
16
- }
17
- .dropzone.dz-clickable .dz-message,
18
- .dropzone.dz-clickable .dz-message span {
19
- cursor: pointer;
20
- }
21
- .dropzone.dz-clickable * {
22
- cursor: default;
23
- }
24
- .dropzone .dz-message {
25
- opacity: 1;
26
- }
27
- .dropzone.dz-drag-hover {
28
- border-color: rgba(0,0,0,0.15);
29
- background: rgba(0,0,0,0.04);
30
- }
31
- .dropzone.dz-started .dz-message {
32
- display: none;
33
- }
34
- .dropzone .dz-preview,
35
- .dropzone-previews .dz-preview {
36
- background: rgba(255,255,255,0.8);
37
- position: relative;
38
- display: inline-block;
39
- margin: 17px;
40
- vertical-align: top;
41
- border: 1px solid #acacac;
42
- padding: 6px 6px 6px 6px;
43
- }
44
- .dropzone .dz-preview.dz-file-preview [data-dz-thumbnail],
45
- .dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] {
46
- display: none;
47
- }
48
- .dropzone .dz-preview .dz-details,
49
- .dropzone-previews .dz-preview .dz-details {
50
- width: 100px;
51
- height: 100px;
52
- position: relative;
53
- background: #ebebeb;
54
- padding: 5px;
55
- margin-bottom: 22px;
56
- }
57
- .dropzone .dz-preview .dz-details .dz-filename,
58
- .dropzone-previews .dz-preview .dz-details .dz-filename {
59
- overflow: hidden;
60
- height: 100%;
61
- }
62
- .dropzone .dz-preview .dz-details img,
63
- .dropzone-previews .dz-preview .dz-details img {
64
- absolute: top left;
65
- width: 100px;
66
- height: 100px;
67
- }
68
- .dropzone .dz-preview .dz-details .dz-size,
69
- .dropzone-previews .dz-preview .dz-details .dz-size {
70
- absolute: bottom -28px left 3px;
71
- height: 28px;
72
- line-height: 28px;
73
- }
74
- .dropzone .dz-preview.dz-error .dz-error-mark,
75
- .dropzone-previews .dz-preview.dz-error .dz-error-mark {
76
- display: block;
77
- }
78
- .dropzone .dz-preview.dz-success .dz-success-mark,
79
- .dropzone-previews .dz-preview.dz-success .dz-success-mark {
80
- display: block;
81
- }
82
- .dropzone .dz-preview:hover .dz-details img,
83
- .dropzone-previews .dz-preview:hover .dz-details img {
84
- display: none;
85
- }
86
- .dropzone .dz-preview .dz-success-mark,
87
- .dropzone-previews .dz-preview .dz-success-mark,
88
- .dropzone .dz-preview .dz-error-mark,
89
- .dropzone-previews .dz-preview .dz-error-mark {
90
- display: none;
91
- position: absolute;
92
- width: 40px;
93
- height: 40px;
94
- font-size: 30px;
95
- text-align: center;
96
- right: -10px;
97
- top: -10px;
98
- }
99
- .dropzone .dz-preview .dz-success-mark,
100
- .dropzone-previews .dz-preview .dz-success-mark {
101
- color: #8cc657;
102
- }
103
- .dropzone .dz-preview .dz-error-mark,
104
- .dropzone-previews .dz-preview .dz-error-mark {
105
- color: #ee162d;
106
- }
107
- .dropzone .dz-preview .dz-progress,
108
- .dropzone-previews .dz-preview .dz-progress {
109
- position: absolute;
110
- top: 100px;
111
- left: 6px;
112
- right: 6px;
113
- height: 6px;
114
- background: #d7d7d7;
115
- display: none;
116
- }
117
- .dropzone .dz-preview .dz-progress .dz-upload,
118
- .dropzone-previews .dz-preview .dz-progress .dz-upload {
119
- display: block;
120
- position: absolute;
121
- top: 0;
122
- bottom: 0;
123
- left: 0;
124
- width: 0%;
125
- background-color: #8cc657;
126
- }
127
- .dropzone .dz-preview.dz-processing .dz-progress,
128
- .dropzone-previews .dz-preview.dz-processing .dz-progress {
129
- display: block;
130
- }
131
- .dropzone .dz-preview .dz-error-message,
132
- .dropzone-previews .dz-preview .dz-error-message {
133
- display: none;
134
- absolute: top -5px left -20px;
135
- background: rgba(245,245,245,0.8);
136
- padding: 8px 10px;
137
- color: #800;
138
- min-width: 140px;
139
- max-width: 500px;
140
- z-index: 500;
141
- }
142
- .dropzone .dz-preview:hover.dz-error .dz-error-message,
143
- .dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
144
- display: block;
145
- }
146
- .dropzone {
147
- border: 1px solid rgba(0,0,0,0.03);
148
- min-height: 360px;
149
- -webkit-border-radius: 3px;
150
- border-radius: 3px;
151
- background: rgba(0,0,0,0.03);
152
- padding: 23px;
153
- }
154
- .dropzone .dz-default.dz-message {
155
- opacity: 1;
156
- -ms-filter: none;
157
- filter: none;
158
- -webkit-transition: opacity 0.3s ease-in-out;
159
- -moz-transition: opacity 0.3s ease-in-out;
160
- -o-transition: opacity 0.3s ease-in-out;
161
- -ms-transition: opacity 0.3s ease-in-out;
162
- transition: opacity 0.3s ease-in-out;
163
- background-image: image-url("dropzone/spritemap.png");
164
- background-repeat: no-repeat;
165
- background-position: 0 0;
166
- position: absolute;
167
- width: 428px;
168
- height: 123px;
169
- margin-left: -214px;
170
- margin-top: -61.5px;
171
- top: 50%;
172
- left: 50%;
173
- }
174
- @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
175
- .dropzone .dz-default.dz-message {
176
- background-image: image-url("dropzone/spritemap@2x.png");
177
- -webkit-background-size: 428px 406px;
178
- -moz-background-size: 428px 406px;
179
- background-size: 428px 406px;
180
- }
181
- }
182
- .dropzone .dz-default.dz-message span {
183
- display: none;
184
- }
185
- .dropzone.dz-square .dz-default.dz-message {
186
- background-position: 0 -123px;
187
- width: 268px;
188
- margin-left: -134px;
189
- height: 174px;
190
- margin-top: -87px;
191
- }
192
- .dropzone.dz-drag-hover .dz-message {
193
- opacity: 0.15;
194
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=15)";
195
- filter: alpha(opacity=15);
196
- }
197
- .dropzone.dz-started .dz-message {
198
- display: block;
199
- opacity: 0;
200
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
201
- filter: alpha(opacity=0);
202
- }
203
- .dropzone .dz-preview,
204
- .dropzone-previews .dz-preview {
205
- -webkit-box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
206
- box-shadow: 1px 1px 4px rgba(0,0,0,0.16);
207
- font-size: 14px;
208
- }
209
- .dropzone .dz-preview.dz-image-preview:hover .dz-details img,
210
- .dropzone-previews .dz-preview.dz-image-preview:hover .dz-details img {
211
- display: block;
212
- opacity: 0.1;
213
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)";
214
- filter: alpha(opacity=10);
215
- }
216
- .dropzone .dz-preview.dz-success .dz-success-mark,
217
- .dropzone-previews .dz-preview.dz-success .dz-success-mark {
218
- opacity: 1;
219
- -ms-filter: none;
220
- filter: none;
221
- }
222
- .dropzone .dz-preview.dz-error .dz-error-mark,
223
- .dropzone-previews .dz-preview.dz-error .dz-error-mark {
224
- opacity: 1;
225
- -ms-filter: none;
226
- filter: none;
227
- }
228
- .dropzone .dz-preview.dz-error .dz-progress .dz-upload,
229
- .dropzone-previews .dz-preview.dz-error .dz-progress .dz-upload {
230
- background: #ee1e2d;
231
- }
232
- .dropzone .dz-preview .dz-error-mark,
233
- .dropzone-previews .dz-preview .dz-error-mark,
234
- .dropzone .dz-preview .dz-success-mark,
235
- .dropzone-previews .dz-preview .dz-success-mark {
236
- display: block;
237
- opacity: 0;
238
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
239
- filter: alpha(opacity=0);
240
- -webkit-transition: opacity 0.4s ease-in-out;
241
- -moz-transition: opacity 0.4s ease-in-out;
242
- -o-transition: opacity 0.4s ease-in-out;
243
- -ms-transition: opacity 0.4s ease-in-out;
244
- transition: opacity 0.4s ease-in-out;
245
- background-image: image-url("dropzone/spritemap.png");
246
- background-repeat: no-repeat;
247
- }
248
- @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
249
- .dropzone .dz-preview .dz-error-mark,
250
- .dropzone-previews .dz-preview .dz-error-mark,
251
- .dropzone .dz-preview .dz-success-mark,
252
- .dropzone-previews .dz-preview .dz-success-mark {
253
- background-image: image-url("dropzone/spritemap@2x.png");
254
- -webkit-background-size: 428px 406px;
255
- -moz-background-size: 428px 406px;
256
- background-size: 428px 406px;
257
- }
258
- }
259
- .dropzone .dz-preview .dz-error-mark span,
260
- .dropzone-previews .dz-preview .dz-error-mark span,
261
- .dropzone .dz-preview .dz-success-mark span,
262
- .dropzone-previews .dz-preview .dz-success-mark span {
263
- display: none;
264
- }
265
- .dropzone .dz-preview .dz-error-mark,
266
- .dropzone-previews .dz-preview .dz-error-mark {
267
- background-position: -268px -123px;
268
- }
269
- .dropzone .dz-preview .dz-success-mark,
270
- .dropzone-previews .dz-preview .dz-success-mark {
271
- background-position: -268px -163px;
272
- }
273
- .dropzone .dz-preview .dz-progress .dz-upload,
274
- .dropzone-previews .dz-preview .dz-progress .dz-upload {
275
- -webkit-animation: loading 0.4s linear infinite;
276
- -moz-animation: loading 0.4s linear infinite;
277
- -o-animation: loading 0.4s linear infinite;
278
- -ms-animation: loading 0.4s linear infinite;
279
- animation: loading 0.4s linear infinite;
280
- -webkit-transition: width 0.3s ease-in-out;
281
- -moz-transition: width 0.3s ease-in-out;
282
- -o-transition: width 0.3s ease-in-out;
283
- -ms-transition: width 0.3s ease-in-out;
284
- transition: width 0.3s ease-in-out;
285
- -webkit-border-radius: 2px;
286
- border-radius: 2px;
287
- position: absolute;
288
- top: 0;
289
- left: 0;
290
- width: 0%;
291
- height: 100%;
292
- background-image: image-url("dropzone/spritemap.png");
293
- background-repeat: repeat-x;
294
- background-position: 0px -400px;
295
- }
296
- @media all and (-webkit-min-device-pixel-ratio:1.5),(min--moz-device-pixel-ratio:1.5),(-o-min-device-pixel-ratio:1.5/1),(min-device-pixel-ratio:1.5),(min-resolution:138dpi),(min-resolution:1.5dppx) {
297
- .dropzone .dz-preview .dz-progress .dz-upload,
298
- .dropzone-previews .dz-preview .dz-progress .dz-upload {
299
- background-image: image-url("dropzone/spritemap@2x.png");
300
- -webkit-background-size: 428px 406px;
301
- -moz-background-size: 428px 406px;
302
- background-size: 428px 406px;
303
- }
304
- }
305
- .dropzone .dz-preview.dz-success .dz-progress,
306
- .dropzone-previews .dz-preview.dz-success .dz-progress {
307
- display: block;
308
- opacity: 0;
309
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
310
- filter: alpha(opacity=0);
311
- -webkit-transition: opacity 0.4s ease-in-out;
312
- -moz-transition: opacity 0.4s ease-in-out;
313
- -o-transition: opacity 0.4s ease-in-out;
314
- -ms-transition: opacity 0.4s ease-in-out;
315
- transition: opacity 0.4s ease-in-out;
316
- }
317
- .dropzone .dz-preview .dz-error-message,
318
- .dropzone-previews .dz-preview .dz-error-message {
319
- display: block;
320
- opacity: 0;
321
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
322
- filter: alpha(opacity=0);
323
- -webkit-transition: opacity 0.3s ease-in-out;
324
- -moz-transition: opacity 0.3s ease-in-out;
325
- -o-transition: opacity 0.3s ease-in-out;
326
- -ms-transition: opacity 0.3s ease-in-out;
327
- transition: opacity 0.3s ease-in-out;
328
- }
329
- .dropzone .dz-preview:hover.dz-error .dz-error-message,
330
- .dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
331
- opacity: 1;
332
- -ms-filter: none;
333
- filter: none;
334
- }
335
- .dropzone a.dz-remove,
336
- .dropzone-previews a.dz-remove {
337
- background-image: -webkit-linear-gradient(top, #fafafa, #eee);
338
- background-image: -moz-linear-gradient(top, #fafafa, #eee);
339
- background-image: -o-linear-gradient(top, #fafafa, #eee);
340
- background-image: -ms-linear-gradient(top, #fafafa, #eee);
341
- background-image: linear-gradient(to bottom, #fafafa, #eee);
342
- -webkit-border-radius: 2px;
343
- border-radius: 2px;
344
- border: 1px solid #eee;
345
- text-decoration: none;
346
- display: block;
347
- padding: 4px 5px;
348
- text-align: center;
349
- color: #aaa;
350
- margin-top: 26px;
351
- }
352
- .dropzone a.dz-remove:hover,
353
- .dropzone-previews a.dz-remove:hover {
354
- color: #666;
355
- }
356
- @-moz-keyframes loading {
357
- from {
358
- background-position: 0 -400px;
359
- }
360
- to {
361
- background-position: -7px -400px;
362
- }
363
- }
364
- @-webkit-keyframes loading {
365
- from {
366
- background-position: 0 -400px;
367
- }
368
- to {
369
- background-position: -7px -400px;
370
- }
371
- }
372
- @-o-keyframes loading {
373
- from {
374
- background-position: 0 -400px;
375
- }
376
- to {
377
- background-position: -7px -400px;
378
- }
379
- }
380
- @keyframes loading {
381
- from {
382
- background-position: 0 -400px;
383
- }
384
- to {
385
- background-position: -7px -400px;
386
- }
387
- }