jquery-fileupload-rails 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +38 -16
  3. data/{vendor → app}/assets/images/loading.gif +0 -0
  4. data/{vendor → app}/assets/images/progressbar.gif +0 -0
  5. data/app/assets/javascripts/jquery-fileupload/angularjs.js +12 -0
  6. data/app/assets/javascripts/jquery-fileupload/basic-plus.js +11 -0
  7. data/app/assets/javascripts/jquery-fileupload/basic.js +3 -0
  8. data/{vendor → app}/assets/javascripts/jquery-fileupload/cors/jquery.postmessage-transport.js +4 -4
  9. data/{vendor → app}/assets/javascripts/jquery-fileupload/cors/jquery.xdr-transport.js +1 -2
  10. data/app/assets/javascripts/jquery-fileupload/index.js +13 -0
  11. data/app/assets/javascripts/jquery-fileupload/jquery-ui.js +13 -0
  12. data/app/assets/javascripts/jquery-fileupload/jquery.fileupload-angular.js +429 -0
  13. data/app/assets/javascripts/jquery-fileupload/jquery.fileupload-audio.js +106 -0
  14. data/app/assets/javascripts/jquery-fileupload/jquery.fileupload-image.js +315 -0
  15. data/app/assets/javascripts/jquery-fileupload/jquery.fileupload-jquery-ui.js +152 -0
  16. data/app/assets/javascripts/jquery-fileupload/jquery.fileupload-process.js +172 -0
  17. data/{vendor → app}/assets/javascripts/jquery-fileupload/jquery.fileupload-ui.js +178 -273
  18. data/app/assets/javascripts/jquery-fileupload/jquery.fileupload-validate.js +119 -0
  19. data/app/assets/javascripts/jquery-fileupload/jquery.fileupload-video.js +106 -0
  20. data/{vendor → app}/assets/javascripts/jquery-fileupload/jquery.fileupload.js +481 -188
  21. data/{vendor → app}/assets/javascripts/jquery-fileupload/jquery.iframe-transport.js +43 -14
  22. data/{vendor → app}/assets/javascripts/jquery-fileupload/locale.js +0 -0
  23. data/{vendor → app}/assets/javascripts/jquery-fileupload/vendor/canvas-to-blob.js +9 -5
  24. data/{vendor → app}/assets/javascripts/jquery-fileupload/vendor/jquery.ui.widget.js +72 -44
  25. data/app/assets/javascripts/jquery-fileupload/vendor/load-image.all.min.js +1 -0
  26. data/{vendor → app}/assets/javascripts/jquery-fileupload/vendor/tmpl.js +9 -8
  27. data/app/assets/stylesheets/jquery.fileupload-noscript.scss +22 -0
  28. data/app/assets/stylesheets/jquery.fileupload-ui-noscript.scss +17 -0
  29. data/app/assets/stylesheets/jquery.fileupload-ui.scss +57 -0
  30. data/app/assets/stylesheets/jquery.fileupload.scss +36 -0
  31. data/lib/jquery/fileupload/rails/version.rb +1 -1
  32. metadata +43 -39
  33. data/vendor/assets/javascripts/jquery-fileupload/basic.js +0 -4
  34. data/vendor/assets/javascripts/jquery-fileupload/index.js +0 -9
  35. data/vendor/assets/javascripts/jquery-fileupload/jquery.fileupload-fp.js +0 -223
  36. data/vendor/assets/javascripts/jquery-fileupload/vendor/load-image.js +0 -121
  37. data/vendor/assets/stylesheets/jquery.fileupload-ui.scss +0 -84
@@ -1,121 +0,0 @@
1
- /*
2
- * JavaScript Load Image 1.2.1
3
- * https://github.com/blueimp/JavaScript-Load-Image
4
- *
5
- * Copyright 2011, Sebastian Tschan
6
- * https://blueimp.net
7
- *
8
- * Licensed under the MIT license:
9
- * http://www.opensource.org/licenses/MIT
10
- */
11
-
12
- /*jslint nomen: true */
13
- /*global window, document, URL, webkitURL, Blob, File, FileReader, define */
14
-
15
- (function ($) {
16
- 'use strict';
17
-
18
- // Loads an image for a given File object.
19
- // Invokes the callback with an img or optional canvas
20
- // element (if supported by the browser) as parameter:
21
- var loadImage = function (file, callback, options) {
22
- var img = document.createElement('img'),
23
- url,
24
- oUrl;
25
- img.onerror = callback;
26
- img.onload = function () {
27
- if (oUrl && !(options && options.noRevoke)) {
28
- loadImage.revokeObjectURL(oUrl);
29
- }
30
- callback(loadImage.scale(img, options));
31
- };
32
- if ((window.Blob && file instanceof Blob) ||
33
- // Files are also Blob instances, but some browsers
34
- // (Firefox 3.6) support the File API but not Blobs:
35
- (window.File && file instanceof File)) {
36
- url = oUrl = loadImage.createObjectURL(file);
37
- } else {
38
- url = file;
39
- }
40
- if (url) {
41
- img.src = url;
42
- return img;
43
- }
44
- return loadImage.readFile(file, function (url) {
45
- img.src = url;
46
- });
47
- },
48
- // The check for URL.revokeObjectURL fixes an issue with Opera 12,
49
- // which provides URL.createObjectURL but doesn't properly implement it:
50
- urlAPI = (window.createObjectURL && window) ||
51
- (window.URL && URL.revokeObjectURL && URL) ||
52
- (window.webkitURL && webkitURL);
53
-
54
- // Scales the given image (img or canvas HTML element)
55
- // using the given options.
56
- // Returns a canvas object if the browser supports canvas
57
- // and the canvas option is true or a canvas object is passed
58
- // as image, else the scaled image:
59
- loadImage.scale = function (img, options) {
60
- options = options || {};
61
- var canvas = document.createElement('canvas'),
62
- width = img.width,
63
- height = img.height,
64
- scale = Math.max(
65
- (options.minWidth || width) / width,
66
- (options.minHeight || height) / height
67
- );
68
- if (scale > 1) {
69
- width = parseInt(width * scale, 10);
70
- height = parseInt(height * scale, 10);
71
- }
72
- scale = Math.min(
73
- (options.maxWidth || width) / width,
74
- (options.maxHeight || height) / height
75
- );
76
- if (scale < 1) {
77
- width = parseInt(width * scale, 10);
78
- height = parseInt(height * scale, 10);
79
- }
80
- if (img.getContext || (options.canvas && canvas.getContext)) {
81
- canvas.width = width;
82
- canvas.height = height;
83
- canvas.getContext('2d')
84
- .drawImage(img, 0, 0, width, height);
85
- return canvas;
86
- }
87
- img.width = width;
88
- img.height = height;
89
- return img;
90
- };
91
-
92
- loadImage.createObjectURL = function (file) {
93
- return urlAPI ? urlAPI.createObjectURL(file) : false;
94
- };
95
-
96
- loadImage.revokeObjectURL = function (url) {
97
- return urlAPI ? urlAPI.revokeObjectURL(url) : false;
98
- };
99
-
100
- // Loads a given File object via FileReader interface,
101
- // invokes the callback with a data url:
102
- loadImage.readFile = function (file, callback) {
103
- if (window.FileReader && FileReader.prototype.readAsDataURL) {
104
- var fileReader = new FileReader();
105
- fileReader.onload = function (e) {
106
- callback(e.target.result);
107
- };
108
- fileReader.readAsDataURL(file);
109
- return fileReader;
110
- }
111
- return false;
112
- };
113
-
114
- if (typeof define === 'function' && define.amd) {
115
- define(function () {
116
- return loadImage;
117
- });
118
- } else {
119
- $.loadImage = loadImage;
120
- }
121
- }(this));
@@ -1,84 +0,0 @@
1
- @charset 'UTF-8';
2
- /*
3
- * jQuery File Upload UI Plugin CSS 6.3
4
- * https://github.com/blueimp/jQuery-File-Upload
5
- *
6
- * Copyright 2010, Sebastian Tschan
7
- * https://blueimp.net
8
- *
9
- * Licensed under the MIT license:
10
- * http://www.opensource.org/licenses/MIT
11
- */
12
-
13
- .fileinput-button {
14
- position: relative;
15
- overflow: hidden;
16
- float: left;
17
- margin-right: 4px;
18
- }
19
- .fileinput-button input {
20
- position: absolute;
21
- top: 0;
22
- right: 0;
23
- margin: 0;
24
- border: solid transparent;
25
- border-width: 0 0 100px 200px;
26
- opacity: 0;
27
- filter: alpha(opacity=0);
28
- -moz-transform: translate(-300px, 0) scale(4);
29
- direction: ltr;
30
- cursor: pointer;
31
- }
32
- .fileupload-buttonbar .btn,
33
- .fileupload-buttonbar .toggle {
34
- margin-bottom: 5px;
35
- }
36
- .files .progress {
37
- width: 200px;
38
- }
39
- .progress-animated .bar {
40
- background: image-url('progressbar.gif') !important;
41
- filter: none;
42
- }
43
- .fileupload-loading {
44
- position: absolute;
45
- left: 50%;
46
- width: 128px;
47
- height: 128px;
48
- background: image-url('loading.gif') center no-repeat;
49
- display: none;
50
- }
51
- .fileupload-processing .fileupload-loading {
52
- display: block;
53
- }
54
-
55
- /* Fix for IE 6: */
56
- * html .fileinput-button {
57
- line-height: 22px;
58
- margin: 1px -3px 0 0;
59
- }
60
-
61
- /* Fix for IE 7: */
62
- * + html .fileinput-button {
63
- margin: 1px 0 0 0;
64
- }
65
-
66
- @media (max-width: 480px) {
67
- .files .btn span {
68
- display: none;
69
- }
70
- .files .preview * {
71
- width: 40px;
72
- }
73
- .files .name * {
74
- width: 80px;
75
- display: inline-block;
76
- word-wrap: break-word;
77
- }
78
- .files .progress {
79
- width: 20px;
80
- }
81
- .files .delete {
82
- width: 60px;
83
- }
84
- }