card-mod-machines 0.11.6 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/file/all_script_machine_output/file.js +68 -35959
- metadata +13 -89
- data/vendor/jquery_file_upload/CONTRIBUTING.md +0 -15
- data/vendor/jquery_file_upload/LICENSE.txt +0 -21
- data/vendor/jquery_file_upload/README.md +0 -107
- data/vendor/jquery_file_upload/angularjs.html +0 -211
- data/vendor/jquery_file_upload/basic-plus.html +0 -226
- data/vendor/jquery_file_upload/basic.html +0 -136
- data/vendor/jquery_file_upload/bower-version-update.js +0 -16
- data/vendor/jquery_file_upload/bower.json +0 -64
- data/vendor/jquery_file_upload/cors/postmessage.html +0 -75
- data/vendor/jquery_file_upload/cors/result.html +0 -24
- data/vendor/jquery_file_upload/css/jquery-ui-demo-ie8.css +0 -21
- data/vendor/jquery_file_upload/css/jquery-ui-demo.css +0 -67
- data/vendor/jquery_file_upload/css/jquery.fileupload-noscript.css +0 -22
- data/vendor/jquery_file_upload/css/jquery.fileupload-ui-noscript.css +0 -17
- data/vendor/jquery_file_upload/css/jquery.fileupload-ui.css +0 -57
- data/vendor/jquery_file_upload/css/jquery.fileupload.css +0 -37
- data/vendor/jquery_file_upload/css/style.css +0 -15
- data/vendor/jquery_file_upload/img/loading.gif +0 -0
- data/vendor/jquery_file_upload/img/progressbar.gif +0 -0
- data/vendor/jquery_file_upload/index.html +0 -255
- data/vendor/jquery_file_upload/jquery-ui.html +0 -252
- data/vendor/jquery_file_upload/js/app.js +0 -101
- data/vendor/jquery_file_upload/js/cors/jquery.postmessage-transport.js +0 -126
- data/vendor/jquery_file_upload/js/cors/jquery.xdr-transport.js +0 -89
- data/vendor/jquery_file_upload/js/jquery.fileupload-angular.js +0 -437
- data/vendor/jquery_file_upload/js/jquery.fileupload-audio.js +0 -113
- data/vendor/jquery_file_upload/js/jquery.fileupload-image.js +0 -326
- data/vendor/jquery_file_upload/js/jquery.fileupload-jquery-ui.js +0 -161
- data/vendor/jquery_file_upload/js/jquery.fileupload-process.js +0 -178
- data/vendor/jquery_file_upload/js/jquery.fileupload-ui.js +0 -714
- data/vendor/jquery_file_upload/js/jquery.fileupload-validate.js +0 -125
- data/vendor/jquery_file_upload/js/jquery.fileupload-video.js +0 -113
- data/vendor/jquery_file_upload/js/jquery.fileupload.js +0 -1486
- data/vendor/jquery_file_upload/js/jquery.iframe-transport.js +0 -224
- data/vendor/jquery_file_upload/js/main.js +0 -75
- data/vendor/jquery_file_upload/js/vendor/jquery.ui.widget.js +0 -748
- data/vendor/jquery_file_upload/package.json +0 -55
- data/vendor/jquery_file_upload/server/gae-go/app.yaml +0 -12
- data/vendor/jquery_file_upload/server/gae-go/app/main.go +0 -361
- data/vendor/jquery_file_upload/server/gae-go/static/favicon.ico +0 -0
- data/vendor/jquery_file_upload/server/gae-go/static/robots.txt +0 -2
- data/vendor/jquery_file_upload/server/gae-python/app.yaml +0 -17
- data/vendor/jquery_file_upload/server/gae-python/main.py +0 -204
- data/vendor/jquery_file_upload/server/gae-python/static/favicon.ico +0 -0
- data/vendor/jquery_file_upload/server/gae-python/static/robots.txt +0 -2
- data/vendor/jquery_file_upload/server/php/Dockerfile +0 -38
- data/vendor/jquery_file_upload/server/php/UploadHandler.php +0 -1411
- data/vendor/jquery_file_upload/server/php/docker-compose.yml +0 -9
- data/vendor/jquery_file_upload/server/php/index.php +0 -15
- data/vendor/jquery_file_upload/test/index.html +0 -172
- data/vendor/jquery_file_upload/test/test.js +0 -1292
- data/vendor/jquery_rails/CHANGELOG.md +0 -359
- data/vendor/jquery_rails/CONTRIBUTING.md +0 -132
- data/vendor/jquery_rails/Gemfile +0 -22
- data/vendor/jquery_rails/MIT-LICENSE +0 -21
- data/vendor/jquery_rails/README.md +0 -75
- data/vendor/jquery_rails/Rakefile +0 -59
- data/vendor/jquery_rails/VERSIONS.md +0 -62
- data/vendor/jquery_rails/jquery-rails.gemspec +0 -26
- data/vendor/jquery_rails/lib/jquery-rails.rb +0 -1
- data/vendor/jquery_rails/lib/jquery/assert_select.rb +0 -149
- data/vendor/jquery_rails/lib/jquery/rails.rb +0 -8
- data/vendor/jquery_rails/lib/jquery/rails/engine.rb +0 -6
- data/vendor/jquery_rails/lib/jquery/rails/version.rb +0 -9
- data/vendor/jquery_rails/test/assert_select_jquery_test.rb +0 -85
- data/vendor/jquery_rails/test/test_helper.rb +0 -6
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery.js +0 -11008
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery.min.js +0 -5
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery.min.map +0 -1
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.js +0 -9814
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.js +0 -4
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery2.min.map +0 -1
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.js +0 -10364
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.js +0 -2
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery3.min.map +0 -1
- data/vendor/jquery_rails/vendor/assets/javascripts/jquery_ujs.js +0 -555
@@ -1,113 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery File Upload Audio Preview Plugin
|
3
|
-
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
-
*
|
5
|
-
* Copyright 2013, Sebastian Tschan
|
6
|
-
* https://blueimp.net
|
7
|
-
*
|
8
|
-
* Licensed under the MIT license:
|
9
|
-
* https://opensource.org/licenses/MIT
|
10
|
-
*/
|
11
|
-
|
12
|
-
/* jshint nomen:false */
|
13
|
-
/* global define, require, window, document */
|
14
|
-
|
15
|
-
;(function (factory) {
|
16
|
-
'use strict';
|
17
|
-
if (typeof define === 'function' && define.amd) {
|
18
|
-
// Register as an anonymous AMD module:
|
19
|
-
define([
|
20
|
-
'jquery',
|
21
|
-
'load-image',
|
22
|
-
'./jquery.fileupload-process'
|
23
|
-
], factory);
|
24
|
-
} else if (typeof exports === 'object') {
|
25
|
-
// Node/CommonJS:
|
26
|
-
factory(
|
27
|
-
require('jquery'),
|
28
|
-
require('blueimp-load-image/js/load-image'),
|
29
|
-
require('./jquery.fileupload-process')
|
30
|
-
);
|
31
|
-
} else {
|
32
|
-
// Browser globals:
|
33
|
-
factory(
|
34
|
-
window.jQuery,
|
35
|
-
window.loadImage
|
36
|
-
);
|
37
|
-
}
|
38
|
-
}(function ($, loadImage) {
|
39
|
-
'use strict';
|
40
|
-
|
41
|
-
// Prepend to the default processQueue:
|
42
|
-
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
43
|
-
{
|
44
|
-
action: 'loadAudio',
|
45
|
-
// Use the action as prefix for the "@" options:
|
46
|
-
prefix: true,
|
47
|
-
fileTypes: '@',
|
48
|
-
maxFileSize: '@',
|
49
|
-
disabled: '@disableAudioPreview'
|
50
|
-
},
|
51
|
-
{
|
52
|
-
action: 'setAudio',
|
53
|
-
name: '@audioPreviewName',
|
54
|
-
disabled: '@disableAudioPreview'
|
55
|
-
}
|
56
|
-
);
|
57
|
-
|
58
|
-
// The File Upload Audio Preview plugin extends the fileupload widget
|
59
|
-
// with audio preview functionality:
|
60
|
-
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
61
|
-
|
62
|
-
options: {
|
63
|
-
// The regular expression for the types of audio files to load,
|
64
|
-
// matched against the file type:
|
65
|
-
loadAudioFileTypes: /^audio\/.*$/
|
66
|
-
},
|
67
|
-
|
68
|
-
_audioElement: document.createElement('audio'),
|
69
|
-
|
70
|
-
processActions: {
|
71
|
-
|
72
|
-
// Loads the audio file given via data.files and data.index
|
73
|
-
// as audio element if the browser supports playing it.
|
74
|
-
// Accepts the options fileTypes (regular expression)
|
75
|
-
// and maxFileSize (integer) to limit the files to load:
|
76
|
-
loadAudio: function (data, options) {
|
77
|
-
if (options.disabled) {
|
78
|
-
return data;
|
79
|
-
}
|
80
|
-
var file = data.files[data.index],
|
81
|
-
url,
|
82
|
-
audio;
|
83
|
-
if (this._audioElement.canPlayType &&
|
84
|
-
this._audioElement.canPlayType(file.type) &&
|
85
|
-
($.type(options.maxFileSize) !== 'number' ||
|
86
|
-
file.size <= options.maxFileSize) &&
|
87
|
-
(!options.fileTypes ||
|
88
|
-
options.fileTypes.test(file.type))) {
|
89
|
-
url = loadImage.createObjectURL(file);
|
90
|
-
if (url) {
|
91
|
-
audio = this._audioElement.cloneNode(false);
|
92
|
-
audio.src = url;
|
93
|
-
audio.controls = true;
|
94
|
-
data.audio = audio;
|
95
|
-
return data;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
return data;
|
99
|
-
},
|
100
|
-
|
101
|
-
// Sets the audio element as a property of the file object:
|
102
|
-
setAudio: function (data, options) {
|
103
|
-
if (data.audio && !options.disabled) {
|
104
|
-
data.files[data.index][options.name || 'preview'] = data.audio;
|
105
|
-
}
|
106
|
-
return data;
|
107
|
-
}
|
108
|
-
|
109
|
-
}
|
110
|
-
|
111
|
-
});
|
112
|
-
|
113
|
-
}));
|
@@ -1,326 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery File Upload Image Preview & Resize Plugin
|
3
|
-
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
-
*
|
5
|
-
* Copyright 2013, Sebastian Tschan
|
6
|
-
* https://blueimp.net
|
7
|
-
*
|
8
|
-
* Licensed under the MIT license:
|
9
|
-
* https://opensource.org/licenses/MIT
|
10
|
-
*/
|
11
|
-
|
12
|
-
/* jshint nomen:false */
|
13
|
-
/* global define, require, window, Blob */
|
14
|
-
|
15
|
-
;(function (factory) {
|
16
|
-
'use strict';
|
17
|
-
if (typeof define === 'function' && define.amd) {
|
18
|
-
// Register as an anonymous AMD module:
|
19
|
-
define([
|
20
|
-
'jquery',
|
21
|
-
'load-image',
|
22
|
-
'load-image-meta',
|
23
|
-
'load-image-scale',
|
24
|
-
'load-image-exif',
|
25
|
-
'canvas-to-blob',
|
26
|
-
'./jquery.fileupload-process'
|
27
|
-
], factory);
|
28
|
-
} else if (typeof exports === 'object') {
|
29
|
-
// Node/CommonJS:
|
30
|
-
factory(
|
31
|
-
require('jquery'),
|
32
|
-
require('blueimp-load-image/js/load-image'),
|
33
|
-
require('blueimp-load-image/js/load-image-meta'),
|
34
|
-
require('blueimp-load-image/js/load-image-scale'),
|
35
|
-
require('blueimp-load-image/js/load-image-exif'),
|
36
|
-
require('blueimp-canvas-to-blob'),
|
37
|
-
require('./jquery.fileupload-process')
|
38
|
-
);
|
39
|
-
} else {
|
40
|
-
// Browser globals:
|
41
|
-
factory(
|
42
|
-
window.jQuery,
|
43
|
-
window.loadImage
|
44
|
-
);
|
45
|
-
}
|
46
|
-
}(function ($, loadImage) {
|
47
|
-
'use strict';
|
48
|
-
|
49
|
-
// Prepend to the default processQueue:
|
50
|
-
$.blueimp.fileupload.prototype.options.processQueue.unshift(
|
51
|
-
{
|
52
|
-
action: 'loadImageMetaData',
|
53
|
-
disableImageHead: '@',
|
54
|
-
disableExif: '@',
|
55
|
-
disableExifThumbnail: '@',
|
56
|
-
disableExifSub: '@',
|
57
|
-
disableExifGps: '@',
|
58
|
-
disabled: '@disableImageMetaDataLoad'
|
59
|
-
},
|
60
|
-
{
|
61
|
-
action: 'loadImage',
|
62
|
-
// Use the action as prefix for the "@" options:
|
63
|
-
prefix: true,
|
64
|
-
fileTypes: '@',
|
65
|
-
maxFileSize: '@',
|
66
|
-
noRevoke: '@',
|
67
|
-
disabled: '@disableImageLoad'
|
68
|
-
},
|
69
|
-
{
|
70
|
-
action: 'resizeImage',
|
71
|
-
// Use "image" as prefix for the "@" options:
|
72
|
-
prefix: 'image',
|
73
|
-
maxWidth: '@',
|
74
|
-
maxHeight: '@',
|
75
|
-
minWidth: '@',
|
76
|
-
minHeight: '@',
|
77
|
-
crop: '@',
|
78
|
-
orientation: '@',
|
79
|
-
forceResize: '@',
|
80
|
-
disabled: '@disableImageResize'
|
81
|
-
},
|
82
|
-
{
|
83
|
-
action: 'saveImage',
|
84
|
-
quality: '@imageQuality',
|
85
|
-
type: '@imageType',
|
86
|
-
disabled: '@disableImageResize'
|
87
|
-
},
|
88
|
-
{
|
89
|
-
action: 'saveImageMetaData',
|
90
|
-
disabled: '@disableImageMetaDataSave'
|
91
|
-
},
|
92
|
-
{
|
93
|
-
action: 'resizeImage',
|
94
|
-
// Use "preview" as prefix for the "@" options:
|
95
|
-
prefix: 'preview',
|
96
|
-
maxWidth: '@',
|
97
|
-
maxHeight: '@',
|
98
|
-
minWidth: '@',
|
99
|
-
minHeight: '@',
|
100
|
-
crop: '@',
|
101
|
-
orientation: '@',
|
102
|
-
thumbnail: '@',
|
103
|
-
canvas: '@',
|
104
|
-
disabled: '@disableImagePreview'
|
105
|
-
},
|
106
|
-
{
|
107
|
-
action: 'setImage',
|
108
|
-
name: '@imagePreviewName',
|
109
|
-
disabled: '@disableImagePreview'
|
110
|
-
},
|
111
|
-
{
|
112
|
-
action: 'deleteImageReferences',
|
113
|
-
disabled: '@disableImageReferencesDeletion'
|
114
|
-
}
|
115
|
-
);
|
116
|
-
|
117
|
-
// The File Upload Resize plugin extends the fileupload widget
|
118
|
-
// with image resize functionality:
|
119
|
-
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
120
|
-
|
121
|
-
options: {
|
122
|
-
// The regular expression for the types of images to load:
|
123
|
-
// matched against the file type:
|
124
|
-
loadImageFileTypes: /^image\/(gif|jpeg|png|svg\+xml)$/,
|
125
|
-
// The maximum file size of images to load:
|
126
|
-
loadImageMaxFileSize: 10000000, // 10MB
|
127
|
-
// The maximum width of resized images:
|
128
|
-
imageMaxWidth: 1920,
|
129
|
-
// The maximum height of resized images:
|
130
|
-
imageMaxHeight: 1080,
|
131
|
-
// Defines the image orientation (1-8) or takes the orientation
|
132
|
-
// value from Exif data if set to true:
|
133
|
-
imageOrientation: false,
|
134
|
-
// Define if resized images should be cropped or only scaled:
|
135
|
-
imageCrop: false,
|
136
|
-
// Disable the resize image functionality by default:
|
137
|
-
disableImageResize: true,
|
138
|
-
// The maximum width of the preview images:
|
139
|
-
previewMaxWidth: 80,
|
140
|
-
// The maximum height of the preview images:
|
141
|
-
previewMaxHeight: 80,
|
142
|
-
// Defines the preview orientation (1-8) or takes the orientation
|
143
|
-
// value from Exif data if set to true:
|
144
|
-
previewOrientation: true,
|
145
|
-
// Create the preview using the Exif data thumbnail:
|
146
|
-
previewThumbnail: true,
|
147
|
-
// Define if preview images should be cropped or only scaled:
|
148
|
-
previewCrop: false,
|
149
|
-
// Define if preview images should be resized as canvas elements:
|
150
|
-
previewCanvas: true
|
151
|
-
},
|
152
|
-
|
153
|
-
processActions: {
|
154
|
-
|
155
|
-
// Loads the image given via data.files and data.index
|
156
|
-
// as img element, if the browser supports the File API.
|
157
|
-
// Accepts the options fileTypes (regular expression)
|
158
|
-
// and maxFileSize (integer) to limit the files to load:
|
159
|
-
loadImage: function (data, options) {
|
160
|
-
if (options.disabled) {
|
161
|
-
return data;
|
162
|
-
}
|
163
|
-
var that = this,
|
164
|
-
file = data.files[data.index],
|
165
|
-
dfd = $.Deferred();
|
166
|
-
if (($.type(options.maxFileSize) === 'number' &&
|
167
|
-
file.size > options.maxFileSize) ||
|
168
|
-
(options.fileTypes &&
|
169
|
-
!options.fileTypes.test(file.type)) ||
|
170
|
-
!loadImage(
|
171
|
-
file,
|
172
|
-
function (img) {
|
173
|
-
if (img.src) {
|
174
|
-
data.img = img;
|
175
|
-
}
|
176
|
-
dfd.resolveWith(that, [data]);
|
177
|
-
},
|
178
|
-
options
|
179
|
-
)) {
|
180
|
-
return data;
|
181
|
-
}
|
182
|
-
return dfd.promise();
|
183
|
-
},
|
184
|
-
|
185
|
-
// Resizes the image given as data.canvas or data.img
|
186
|
-
// and updates data.canvas or data.img with the resized image.
|
187
|
-
// Also stores the resized image as preview property.
|
188
|
-
// Accepts the options maxWidth, maxHeight, minWidth,
|
189
|
-
// minHeight, canvas and crop:
|
190
|
-
resizeImage: function (data, options) {
|
191
|
-
if (options.disabled || !(data.canvas || data.img)) {
|
192
|
-
return data;
|
193
|
-
}
|
194
|
-
options = $.extend({canvas: true}, options);
|
195
|
-
var that = this,
|
196
|
-
dfd = $.Deferred(),
|
197
|
-
img = (options.canvas && data.canvas) || data.img,
|
198
|
-
resolve = function (newImg) {
|
199
|
-
if (newImg && (newImg.width !== img.width ||
|
200
|
-
newImg.height !== img.height ||
|
201
|
-
options.forceResize)) {
|
202
|
-
data[newImg.getContext ? 'canvas' : 'img'] = newImg;
|
203
|
-
}
|
204
|
-
data.preview = newImg;
|
205
|
-
dfd.resolveWith(that, [data]);
|
206
|
-
},
|
207
|
-
thumbnail;
|
208
|
-
if (data.exif) {
|
209
|
-
if (options.orientation === true) {
|
210
|
-
options.orientation = data.exif.get('Orientation');
|
211
|
-
}
|
212
|
-
if (options.thumbnail) {
|
213
|
-
thumbnail = data.exif.get('Thumbnail');
|
214
|
-
if (thumbnail) {
|
215
|
-
loadImage(thumbnail, resolve, options);
|
216
|
-
return dfd.promise();
|
217
|
-
}
|
218
|
-
}
|
219
|
-
// Prevent orienting the same image twice:
|
220
|
-
if (data.orientation) {
|
221
|
-
delete options.orientation;
|
222
|
-
} else {
|
223
|
-
data.orientation = options.orientation;
|
224
|
-
}
|
225
|
-
}
|
226
|
-
if (img) {
|
227
|
-
resolve(loadImage.scale(img, options));
|
228
|
-
return dfd.promise();
|
229
|
-
}
|
230
|
-
return data;
|
231
|
-
},
|
232
|
-
|
233
|
-
// Saves the processed image given as data.canvas
|
234
|
-
// inplace at data.index of data.files:
|
235
|
-
saveImage: function (data, options) {
|
236
|
-
if (!data.canvas || options.disabled) {
|
237
|
-
return data;
|
238
|
-
}
|
239
|
-
var that = this,
|
240
|
-
file = data.files[data.index],
|
241
|
-
dfd = $.Deferred();
|
242
|
-
if (data.canvas.toBlob) {
|
243
|
-
data.canvas.toBlob(
|
244
|
-
function (blob) {
|
245
|
-
if (!blob.name) {
|
246
|
-
if (file.type === blob.type) {
|
247
|
-
blob.name = file.name;
|
248
|
-
} else if (file.name) {
|
249
|
-
blob.name = file.name.replace(
|
250
|
-
/\.\w+$/,
|
251
|
-
'.' + blob.type.substr(6)
|
252
|
-
);
|
253
|
-
}
|
254
|
-
}
|
255
|
-
// Don't restore invalid meta data:
|
256
|
-
if (file.type !== blob.type) {
|
257
|
-
delete data.imageHead;
|
258
|
-
}
|
259
|
-
// Store the created blob at the position
|
260
|
-
// of the original file in the files list:
|
261
|
-
data.files[data.index] = blob;
|
262
|
-
dfd.resolveWith(that, [data]);
|
263
|
-
},
|
264
|
-
options.type || file.type,
|
265
|
-
options.quality
|
266
|
-
);
|
267
|
-
} else {
|
268
|
-
return data;
|
269
|
-
}
|
270
|
-
return dfd.promise();
|
271
|
-
},
|
272
|
-
|
273
|
-
loadImageMetaData: function (data, options) {
|
274
|
-
if (options.disabled) {
|
275
|
-
return data;
|
276
|
-
}
|
277
|
-
var that = this,
|
278
|
-
dfd = $.Deferred();
|
279
|
-
loadImage.parseMetaData(data.files[data.index], function (result) {
|
280
|
-
$.extend(data, result);
|
281
|
-
dfd.resolveWith(that, [data]);
|
282
|
-
}, options);
|
283
|
-
return dfd.promise();
|
284
|
-
},
|
285
|
-
|
286
|
-
saveImageMetaData: function (data, options) {
|
287
|
-
if (!(data.imageHead && data.canvas &&
|
288
|
-
data.canvas.toBlob && !options.disabled)) {
|
289
|
-
return data;
|
290
|
-
}
|
291
|
-
var file = data.files[data.index],
|
292
|
-
blob = new Blob([
|
293
|
-
data.imageHead,
|
294
|
-
// Resized images always have a head size of 20 bytes,
|
295
|
-
// including the JPEG marker and a minimal JFIF header:
|
296
|
-
this._blobSlice.call(file, 20)
|
297
|
-
], {type: file.type});
|
298
|
-
blob.name = file.name;
|
299
|
-
data.files[data.index] = blob;
|
300
|
-
return data;
|
301
|
-
},
|
302
|
-
|
303
|
-
// Sets the resized version of the image as a property of the
|
304
|
-
// file object, must be called after "saveImage":
|
305
|
-
setImage: function (data, options) {
|
306
|
-
if (data.preview && !options.disabled) {
|
307
|
-
data.files[data.index][options.name || 'preview'] = data.preview;
|
308
|
-
}
|
309
|
-
return data;
|
310
|
-
},
|
311
|
-
|
312
|
-
deleteImageReferences: function (data, options) {
|
313
|
-
if (!options.disabled) {
|
314
|
-
delete data.img;
|
315
|
-
delete data.canvas;
|
316
|
-
delete data.preview;
|
317
|
-
delete data.imageHead;
|
318
|
-
}
|
319
|
-
return data;
|
320
|
-
}
|
321
|
-
|
322
|
-
}
|
323
|
-
|
324
|
-
});
|
325
|
-
|
326
|
-
}));
|
@@ -1,161 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery File Upload jQuery UI Plugin
|
3
|
-
* https://github.com/blueimp/jQuery-File-Upload
|
4
|
-
*
|
5
|
-
* Copyright 2013, Sebastian Tschan
|
6
|
-
* https://blueimp.net
|
7
|
-
*
|
8
|
-
* Licensed under the MIT license:
|
9
|
-
* https://opensource.org/licenses/MIT
|
10
|
-
*/
|
11
|
-
|
12
|
-
/* jshint nomen:false */
|
13
|
-
/* global define, require, window */
|
14
|
-
|
15
|
-
;(function (factory) {
|
16
|
-
'use strict';
|
17
|
-
if (typeof define === 'function' && define.amd) {
|
18
|
-
// Register as an anonymous AMD module:
|
19
|
-
define([
|
20
|
-
'jquery',
|
21
|
-
'./jquery.fileupload-ui'
|
22
|
-
], factory);
|
23
|
-
} else if (typeof exports === 'object') {
|
24
|
-
// Node/CommonJS:
|
25
|
-
factory(
|
26
|
-
require('jquery'),
|
27
|
-
require('./jquery.fileupload-ui')
|
28
|
-
);
|
29
|
-
} else {
|
30
|
-
// Browser globals:
|
31
|
-
factory(window.jQuery);
|
32
|
-
}
|
33
|
-
}(function ($) {
|
34
|
-
'use strict';
|
35
|
-
|
36
|
-
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
|
37
|
-
|
38
|
-
options: {
|
39
|
-
processdone: function (e, data) {
|
40
|
-
data.context.find('.start').button('enable');
|
41
|
-
},
|
42
|
-
progress: function (e, data) {
|
43
|
-
if (data.context) {
|
44
|
-
data.context.find('.progress').progressbar(
|
45
|
-
'option',
|
46
|
-
'value',
|
47
|
-
parseInt(data.loaded / data.total * 100, 10)
|
48
|
-
);
|
49
|
-
}
|
50
|
-
},
|
51
|
-
progressall: function (e, data) {
|
52
|
-
var $this = $(this);
|
53
|
-
$this.find('.fileupload-progress')
|
54
|
-
.find('.progress').progressbar(
|
55
|
-
'option',
|
56
|
-
'value',
|
57
|
-
parseInt(data.loaded / data.total * 100, 10)
|
58
|
-
).end()
|
59
|
-
.find('.progress-extended').each(function () {
|
60
|
-
$(this).html(
|
61
|
-
($this.data('blueimp-fileupload') ||
|
62
|
-
$this.data('fileupload'))
|
63
|
-
._renderExtendedProgress(data)
|
64
|
-
);
|
65
|
-
});
|
66
|
-
}
|
67
|
-
},
|
68
|
-
|
69
|
-
_renderUpload: function (func, files) {
|
70
|
-
var node = this._super(func, files),
|
71
|
-
showIconText = $(window).width() > 480;
|
72
|
-
node.find('.progress').empty().progressbar();
|
73
|
-
node.find('.start').button({
|
74
|
-
icons: {primary: 'ui-icon-circle-arrow-e'},
|
75
|
-
text: showIconText
|
76
|
-
});
|
77
|
-
node.find('.cancel').button({
|
78
|
-
icons: {primary: 'ui-icon-cancel'},
|
79
|
-
text: showIconText
|
80
|
-
});
|
81
|
-
if (node.hasClass('fade')) {
|
82
|
-
node.hide();
|
83
|
-
}
|
84
|
-
return node;
|
85
|
-
},
|
86
|
-
|
87
|
-
_renderDownload: function (func, files) {
|
88
|
-
var node = this._super(func, files),
|
89
|
-
showIconText = $(window).width() > 480;
|
90
|
-
node.find('.delete').button({
|
91
|
-
icons: {primary: 'ui-icon-trash'},
|
92
|
-
text: showIconText
|
93
|
-
});
|
94
|
-
if (node.hasClass('fade')) {
|
95
|
-
node.hide();
|
96
|
-
}
|
97
|
-
return node;
|
98
|
-
},
|
99
|
-
|
100
|
-
_startHandler: function (e) {
|
101
|
-
$(e.currentTarget).button('disable');
|
102
|
-
this._super(e);
|
103
|
-
},
|
104
|
-
|
105
|
-
_transition: function (node) {
|
106
|
-
var deferred = $.Deferred();
|
107
|
-
if (node.hasClass('fade')) {
|
108
|
-
node.fadeToggle(
|
109
|
-
this.options.transitionDuration,
|
110
|
-
this.options.transitionEasing,
|
111
|
-
function () {
|
112
|
-
deferred.resolveWith(node);
|
113
|
-
}
|
114
|
-
);
|
115
|
-
} else {
|
116
|
-
deferred.resolveWith(node);
|
117
|
-
}
|
118
|
-
return deferred;
|
119
|
-
},
|
120
|
-
|
121
|
-
_create: function () {
|
122
|
-
this._super();
|
123
|
-
this.element
|
124
|
-
.find('.fileupload-buttonbar')
|
125
|
-
.find('.fileinput-button').each(function () {
|
126
|
-
var input = $(this).find('input:file').detach();
|
127
|
-
$(this)
|
128
|
-
.button({icons: {primary: 'ui-icon-plusthick'}})
|
129
|
-
.append(input);
|
130
|
-
})
|
131
|
-
.end().find('.start')
|
132
|
-
.button({icons: {primary: 'ui-icon-circle-arrow-e'}})
|
133
|
-
.end().find('.cancel')
|
134
|
-
.button({icons: {primary: 'ui-icon-cancel'}})
|
135
|
-
.end().find('.delete')
|
136
|
-
.button({icons: {primary: 'ui-icon-trash'}})
|
137
|
-
.end().find('.progress').progressbar();
|
138
|
-
},
|
139
|
-
|
140
|
-
_destroy: function () {
|
141
|
-
this.element
|
142
|
-
.find('.fileupload-buttonbar')
|
143
|
-
.find('.fileinput-button').each(function () {
|
144
|
-
var input = $(this).find('input:file').detach();
|
145
|
-
$(this)
|
146
|
-
.button('destroy')
|
147
|
-
.append(input);
|
148
|
-
})
|
149
|
-
.end().find('.start')
|
150
|
-
.button('destroy')
|
151
|
-
.end().find('.cancel')
|
152
|
-
.button('destroy')
|
153
|
-
.end().find('.delete')
|
154
|
-
.button('destroy')
|
155
|
-
.end().find('.progress').progressbar('destroy');
|
156
|
-
this._super();
|
157
|
-
}
|
158
|
-
|
159
|
-
});
|
160
|
-
|
161
|
-
}));
|