Slider by WD – Responsive Slider - Version 1.2.27

Version Description

  • Fixed: Video slide Video loop.
  • Updated: jQuery upload library.
Download this release

Release Info

Developer 10web
Plugin Icon 128x128 Slider by WD – Responsive Slider
Version 1.2.27
Comparing to
See all releases

Code changes from version 1.2.26 to 1.2.27

admin/controllers/Sliders.php CHANGED
@@ -671,7 +671,7 @@ class SlidersController_wds {
671
  $att_height = WDW_S_Library::esc_sanitize_data($params_array, 'att_height' . $slide_id, 'sanitize_text_field');
672
  $video_duration = WDW_S_Library::esc_sanitize_data($params_array, 'video_duration' . $slide_id, 'sanitize_text_field');
673
  $youtube_rel_video = ((isset($params_array['youtube_rel_video' . $slide_id]) && !WDS()->is_free) ? (int) WDW_S_Library::esc_sanitize_data($params_array, 'youtube_rel_video' . $slide_id, 'sanitize_text_field', 0) : 0);
674
- $video_loop = ((isset($params_array['video_loop' . $slide_id]) && !WDS()->is_free) ? (int) WDW_S_Library::esc_sanitize_data($params_array, 'fillmode' . $slide_id, 'sanitize_text_field', 0) : 0);
675
  $fillmode = WDW_S_Library::esc_sanitize_data($params_array, 'fillmode' . $slide_id, 'sanitize_text_field');
676
  $title_dimension = array();
677
  $title_dimension['title'] = $title;
671
  $att_height = WDW_S_Library::esc_sanitize_data($params_array, 'att_height' . $slide_id, 'sanitize_text_field');
672
  $video_duration = WDW_S_Library::esc_sanitize_data($params_array, 'video_duration' . $slide_id, 'sanitize_text_field');
673
  $youtube_rel_video = ((isset($params_array['youtube_rel_video' . $slide_id]) && !WDS()->is_free) ? (int) WDW_S_Library::esc_sanitize_data($params_array, 'youtube_rel_video' . $slide_id, 'sanitize_text_field', 0) : 0);
674
+ $video_loop = ((isset($params_array['video_loop' . $slide_id]) && !WDS()->is_free) ? (int) WDW_S_Library::esc_sanitize_data($params_array, 'video_loop' . $slide_id, '', 1) : 0);
675
  $fillmode = WDW_S_Library::esc_sanitize_data($params_array, 'fillmode' . $slide_id, 'sanitize_text_field');
676
  $title_dimension = array();
677
  $title_dimension['title'] = $title;
admin/controllers/elementorWidget.php CHANGED
@@ -47,6 +47,7 @@ class WDSElementor extends \Elementor\Widget_Base {
47
  'label' => __('Slider', WDS()->prefix),
48
  ]
49
  );
 
50
  if($this->get_id() !== null){
51
  $settings = $this->get_init_settings();
52
  }
@@ -55,6 +56,7 @@ class WDSElementor extends \Elementor\Widget_Base {
55
  $wds_id = intval($settings["sliders"]);
56
  $wds_edit_link = add_query_arg(array( 'page' => 'sliders_' . WDS()->prefix, 'task'=>'edit', 'current_id'=>$wds_id ), admin_url('admin.php'));
57
  }
 
58
  $sliders = wds_get_sliders();
59
  $sliders[0] = __('Select a Slider', WDS()->prefix);
60
  $this->add_control(
@@ -71,7 +73,6 @@ class WDSElementor extends \Elementor\Widget_Base {
71
 
72
  $this->end_controls_section();
73
  }
74
-
75
  /**
76
  * Render widget output on the frontend.
77
  */
47
  'label' => __('Slider', WDS()->prefix),
48
  ]
49
  );
50
+
51
  if($this->get_id() !== null){
52
  $settings = $this->get_init_settings();
53
  }
56
  $wds_id = intval($settings["sliders"]);
57
  $wds_edit_link = add_query_arg(array( 'page' => 'sliders_' . WDS()->prefix, 'task'=>'edit', 'current_id'=>$wds_id ), admin_url('admin.php'));
58
  }
59
+
60
  $sliders = wds_get_sliders();
61
  $sliders[0] = __('Select a Slider', WDS()->prefix);
62
  $this->add_control(
73
 
74
  $this->end_controls_section();
75
  }
 
76
  /**
77
  * Render widget output on the frontend.
78
  */
filemanager/js/jq_uploader/jquery.fileupload.js CHANGED
@@ -1,1243 +1,1611 @@
1
  /*
2
- * jQuery File Upload Plugin 5.28.8
3
  * https://github.com/blueimp/jQuery-File-Upload
4
  *
5
  * Copyright 2010, 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, unparam: true, regexp: true */
13
- /*global define, window, document, File, Blob, FormData, location */
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.ui.widget.js'
22
- ], factory);
23
- } else {
24
- // Browser globals:
25
- factory(window.jQuery);
26
- }
27
- }(function ($) {
28
- 'use strict';
29
-
30
- // The FileReader API is not actually used, but works as feature detection,
31
- // as e.g. Safari supports XHR file uploads via the FormData API,
32
- // but not non-multipart XHR file uploads:
33
- $.support.xhrFileUpload = !!(window.XMLHttpRequestUpload && window.FileReader);
34
- $.support.xhrFormDataFileUpload = !!window.FormData;
35
-
36
- // The fileupload widget listens for change events on file input fields defined
37
- // via fileInput setting and paste or drop events of the given dropZone.
38
- // In addition to the default jQuery Widget methods, the fileupload widget
39
- // exposes the "add" and "send" methods, to add or directly send files using
40
- // the fileupload API.
41
- // By default, files added via file input selection, paste, drag & drop or
42
- // "add" method are uploaded immediately, but it is possible to override
43
- // the "add" callback option to queue file uploads.
44
- $.widget('blueimp.fileupload', {
45
-
46
- options: {
47
- // The drop target element(s), by the default the complete document.
48
- // Set to null to disable drag & drop support:
49
- dropZone: $(document),
50
- // The paste target element(s), by the default the complete document.
51
- // Set to null to disable paste support:
52
- pasteZone: $(document),
53
- // The file input field(s), that are listened to for change events.
54
- // If undefined, it is set to the file input fields inside
55
- // of the widget element on plugin initialization.
56
- // Set to null to disable the change listener.
57
- fileInput: undefined,
58
- // By default, the file input field is replaced with a clone after
59
- // each input field change event. This is required for iframe transport
60
- // queues and allows change events to be fired for the same file
61
- // selection, but can be disabled by setting the following option to false:
62
- replaceFileInput: true,
63
- // The parameter name for the file form data (the request argument name).
64
- // If undefined or empty, the name property of the file input field is
65
- // used, or "files[]" if the file input name property is also empty,
66
- // can be a string or an array of strings:
67
- paramName: undefined,
68
- // By default, each file of a selection is uploaded using an individual
69
- // request for XHR type uploads. Set to false to upload file
70
- // selections in one request each:
71
- singleFileUploads: true,
72
- // To limit the number of files uploaded with one XHR request,
73
- // set the following option to an integer greater than 0:
74
- limitMultiFileUploads: undefined,
75
- // Set the following option to true to issue all file upload requests
76
- // in a sequential order:
77
- sequentialUploads: false,
78
- // To limit the number of concurrent uploads,
79
- // set the following option to an integer greater than 0:
80
- limitConcurrentUploads: undefined,
81
- // Set the following option to true to force iframe transport uploads:
82
- forceIframeTransport: false,
83
- // Set the following option to the location of a redirect url on the
84
- // origin server, for cross-domain iframe transport uploads:
85
- redirect: undefined,
86
- // The parameter name for the redirect url, sent as part of the form
87
- // data and set to 'redirect' if this option is empty:
88
- redirectParamName: undefined,
89
- // Set the following option to the location of a postMessage window,
90
- // to enable postMessage transport uploads:
91
- postMessage: undefined,
92
- // By default, XHR file uploads are sent as multipart/form-data.
93
- // The iframe transport is always using multipart/form-data.
94
- // Set to false to enable non-multipart XHR uploads:
95
- multipart: true,
96
- // To upload large files in smaller chunks, set the following option
97
- // to a preferred maximum chunk size. If set to 0, null or undefined,
98
- // or the browser does not support the required Blob API, files will
99
- // be uploaded as a whole.
100
- maxChunkSize: undefined,
101
- // When a non-multipart upload or a chunked multipart upload has been
102
- // aborted, this option can be used to resume the upload by setting
103
- // it to the size of the already uploaded bytes. This option is most
104
- // useful when modifying the options object inside of the "add" or
105
- // "send" callbacks, as the options are cloned for each file upload.
106
- uploadedBytes: undefined,
107
- // By default, failed (abort or error) file uploads are removed from the
108
- // global progress calculation. Set the following option to false to
109
- // prevent recalculating the global progress data:
110
- recalculateProgress: true,
111
- // Interval in milliseconds to calculate and trigger progress events:
112
- progressInterval: 100,
113
- // Interval in milliseconds to calculate progress bitrate:
114
- bitrateInterval: 500,
115
- // By default, uploads are started automatically when adding files:
116
- autoUpload: true,
117
-
118
- // Additional form data to be sent along with the file uploads can be set
119
- // using this option, which accepts an array of objects with name and
120
- // value properties, a function returning such an array, a FormData
121
- // object (for XHR file uploads), or a simple object.
122
- // The form of the first fileInput is given as parameter to the function:
123
- formData: function (form) {
124
- return form.serializeArray();
125
- },
126
-
127
- // The add callback is invoked as soon as files are added to the fileupload
128
- // widget (via file input selection, drag & drop, paste or add API call).
129
- // If the singleFileUploads option is enabled, this callback will be
130
- // called once for each file in the selection for XHR file uplaods, else
131
- // once for each file selection.
132
- // The upload starts when the submit method is invoked on the data parameter.
133
- // The data object contains a files property holding the added files
134
- // and allows to override plugin options as well as define ajax settings.
135
- // Listeners for this callback can also be bound the following way:
136
- // .bind('fileuploadadd', func);
137
- // data.submit() returns a Promise object and allows to attach additional
138
- // handlers using jQuery's Deferred callbacks:
139
- // data.submit().done(func).fail(func).always(func);
140
- add: function (e, data) {
141
- if (data.autoUpload || (data.autoUpload !== false &&
142
- ($(this).data('blueimp-fileupload') ||
143
- $(this).data('fileupload')).options.autoUpload)) {
144
- data.submit();
145
- }
146
- },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
- // Other callbacks:
149
 
150
- // Callback for the submit event of each file upload:
151
- // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);
152
 
153
- // Callback for the start of each file upload request:
154
- // send: function (e, data) {}, // .bind('fileuploadsend', func);
155
 
156
- // Callback for successful uploads:
157
- // done: function (e, data) {}, // .bind('fileuploaddone', func);
158
 
159
- // Callback for failed (abort or error) uploads:
160
- // fail: function (e, data) {}, // .bind('fileuploadfail', func);
161
 
162
- // Callback for completed (success, abort or error) requests:
163
- // always: function (e, data) {}, // .bind('fileuploadalways', func);
164
 
165
- // Callback for upload progress events:
166
- // progress: function (e, data) {}, // .bind('fileuploadprogress', func);
167
 
168
- // Callback for global upload progress events:
169
- // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
170
 
171
- // Callback for uploads start, equivalent to the global ajaxStart event:
172
- // start: function (e) {}, // .bind('fileuploadstart', func);
173
 
174
- // Callback for uploads stop, equivalent to the global ajaxStop event:
175
- // stop: function (e) {}, // .bind('fileuploadstop', func);
176
 
177
- // Callback for change events of the fileInput(s):
178
- // change: function (e, data) {}, // .bind('fileuploadchange', func);
179
 
180
- // Callback for paste events to the pasteZone(s):
181
- // paste: function (e, data) {}, // .bind('fileuploadpaste', func);
182
 
183
- // Callback for drop events of the dropZone(s):
184
- // drop: function (e, data) {}, // .bind('fileuploaddrop', func);
185
 
186
- // Callback for dragover events of the dropZone(s):
187
- // dragover: function (e) {}, // .bind('fileuploaddragover', func);
188
 
189
- // Callback for the start of each chunk upload request:
190
- // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);
191
 
192
- // Callback for successful chunk uploads:
193
- // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);
194
 
195
- // Callback for failed (abort or error) chunk uploads:
196
- // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);
197
 
198
- // Callback for completed (success, abort or error) chunk upload requests:
199
- // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);
200
 
201
- // The plugin options are used as settings object for the ajax calls.
202
- // The following are jQuery ajax settings required for the file uploads:
203
- processData: false,
204
- contentType: false,
205
- cache: false
206
- },
207
 
208
- // A list of options that require a refresh after assigning a new value:
209
- _refreshOptionsList: [
210
- 'fileInput',
211
- 'dropZone',
212
- 'pasteZone',
213
- 'multipart',
214
- 'forceIframeTransport'
215
- ],
216
-
217
- _BitrateTimer: function () {
218
- this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());
219
- this.loaded = 0;
220
- this.bitrate = 0;
221
- this.getBitrate = function (now, loaded, interval) {
222
- var timeDiff = now - this.timestamp;
223
- if (!this.bitrate || !interval || timeDiff > interval) {
224
- this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
225
- this.loaded = loaded;
226
- this.timestamp = now;
227
- }
228
- return this.bitrate;
229
- };
230
- },
231
 
232
- _isXHRUpload: function (options) {
233
- return !options.forceIframeTransport &&
234
- ((!options.multipart && $.support.xhrFileUpload) ||
235
- $.support.xhrFormDataFileUpload);
236
- },
 
 
 
 
237
 
238
- _getFormData: function (options) {
239
- var formData;
240
- if (typeof options.formData === 'function') {
241
- return options.formData(options.form);
242
- }
243
- if ($.isArray(options.formData)) {
244
- return options.formData;
245
- }
246
- if ($.type(options.formData) === 'object') {
247
- formData = [];
248
- $.each(options.formData, function (name, value) {
249
- formData.push({name: name, value: value});
250
- });
251
- return formData;
252
- }
253
- return [];
254
- },
255
 
256
- _getTotal: function (files) {
257
- var total = 0;
258
- $.each(files, function (index, file) {
259
- total += file.size || 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  });
261
- return total;
262
- },
263
-
264
- _initProgressObject: function (obj) {
265
- var progress = {
266
- loaded: 0,
267
- total: 0,
268
- bitrate: 0
269
- };
270
- if (obj._progress) {
271
- $.extend(obj._progress, progress);
272
- } else {
273
- obj._progress = progress;
274
- }
275
- },
276
-
277
- _initResponseObject: function (obj) {
278
- var prop;
279
- if (obj._response) {
280
- for (prop in obj._response) {
281
- if (obj._response.hasOwnProperty(prop)) {
282
- delete obj._response[prop];
283
- }
284
- }
285
- } else {
286
- obj._response = {};
287
- }
288
- },
289
-
290
- _onProgress: function (e, data) {
291
- if (e.lengthComputable) {
292
- var now = ((Date.now) ? Date.now() : (new Date()).getTime()),
293
- loaded;
294
- if (data._time && data.progressInterval &&
295
- (now - data._time < data.progressInterval) &&
296
- e.loaded !== e.total) {
297
- return;
298
- }
299
- data._time = now;
300
- loaded = Math.floor(
301
- e.loaded / e.total * (data.chunkSize || data._progress.total)
302
- ) + (data.uploadedBytes || 0);
303
- // Add the difference from the previously loaded state
304
- // to the global loaded counter:
305
- this._progress.loaded += (loaded - data._progress.loaded);
306
- this._progress.bitrate = this._bitrateTimer.getBitrate(
307
- now,
308
- this._progress.loaded,
309
- data.bitrateInterval
310
- );
311
- data._progress.loaded = data.loaded = loaded;
312
- data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
313
- now,
314
- loaded,
315
- data.bitrateInterval
316
- );
317
- // Trigger a custom progress event with a total data property set
318
- // to the file size(s) of the current upload and a loaded data
319
- // property calculated accordingly:
320
- this._trigger('progress', e, data);
321
- // Trigger a global progress event for all current file uploads,
322
- // including ajax calls queued for sequential file uploads:
323
- this._trigger('progressall', e, this._progress);
324
- }
325
- },
326
-
327
- _initProgressListener: function (options) {
328
- var that = this,
329
- xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
330
- // Accesss to the native XHR object is required to add event listeners
331
- // for the upload progress event:
332
- if (xhr.upload) {
333
- $(xhr.upload).bind('progress', function (e) {
334
- var oe = e.originalEvent;
335
- // Make sure the progress event properties get copied over:
336
- e.lengthComputable = oe.lengthComputable;
337
- e.loaded = oe.loaded;
338
- e.total = oe.total;
339
- that._onProgress(e, options);
340
- });
341
- options.xhr = function () {
342
- return xhr;
343
- };
344
- }
345
- },
346
-
347
- _isInstanceOf: function (type, obj) {
348
- // Cross-frame instanceof check
349
- return Object.prototype.toString.call(obj) === '[object ' + type + ']';
350
- },
351
-
352
- _initXHRData: function (options) {
353
- var that = this,
354
- formData,
355
- file = options.files[0],
356
- // Ignore non-multipart setting if not supported:
357
- multipart = options.multipart || !$.support.xhrFileUpload,
358
- paramName = options.paramName[0];
359
- options.headers = options.headers || {};
360
- if (options.contentRange) {
361
- options.headers['Content-Range'] = options.contentRange;
362
- }
363
- if (!multipart) {
364
- options.headers['Content-Disposition'] = 'attachment; filename="' +
365
- encodeURI(file.name) + '"';
366
- options.contentType = file.type;
367
- options.data = options.blob || file;
368
- } else if ($.support.xhrFormDataFileUpload) {
369
- if (options.postMessage) {
370
- // window.postMessage does not allow sending FormData
371
- // objects, so we just add the File/Blob objects to
372
- // the formData array and let the postMessage window
373
- // create the FormData object out of this array:
374
- formData = this._getFormData(options);
375
- if (options.blob) {
376
- formData.push({
377
- name: paramName,
378
- value: options.blob
379
- });
380
- } else {
381
- $.each(options.files, function (index, file) {
382
- formData.push({
383
- name: options.paramName[index] || paramName,
384
- value: file
385
- });
386
- });
387
- }
388
- } else {
389
- if (that._isInstanceOf('FormData', options.formData)) {
390
- formData = options.formData;
391
- } else {
392
- formData = new FormData();
393
- $.each(this._getFormData(options), function (index, field) {
394
- formData.append(field.name, field.value);
395
- });
396
- }
397
- if (options.blob) {
398
- options.headers['Content-Disposition'] = 'attachment; filename="' +
399
- encodeURI(file.name) + '"';
400
- formData.append(paramName, options.blob, file.name);
401
- } else {
402
- $.each(options.files, function (index, file) {
403
- // This check allows the tests to run with
404
- // dummy objects:
405
- if (that._isInstanceOf('File', file) ||
406
- that._isInstanceOf('Blob', file)) {
407
- formData.append(
408
- options.paramName[index] || paramName,
409
- file,
410
- file.name
411
- );
412
- }
413
- });
414
- }
415
- }
416
- options.data = formData;
417
- }
418
- // Blob reference is not needed anymore, free memory:
419
- options.blob = null;
420
- },
421
-
422
- _initIframeSettings: function (options) {
423
- // Setting the dataType to iframe enables the iframe transport:
424
- options.dataType = 'iframe ' + (options.dataType || '');
425
- // The iframe transport accepts a serialized array as form data:
426
- options.formData = this._getFormData(options);
427
- // Add redirect url to form data on cross-domain uploads:
428
- if (options.redirect && $('<a></a>').prop('href', options.url)
429
- .prop('host') !== location.host) {
430
- options.formData.push({
431
- name: options.redirectParamName || 'redirect',
432
- value: options.redirect
433
- });
434
- }
435
- },
436
-
437
- _initDataSettings: function (options) {
438
- if (this._isXHRUpload(options)) {
439
- if (!this._chunkedUpload(options, true)) {
440
- if (!options.data) {
441
- this._initXHRData(options);
442
- }
443
- this._initProgressListener(options);
444
- }
445
- if (options.postMessage) {
446
- // Setting the dataType to postmessage enables the
447
- // postMessage transport:
448
- options.dataType = 'postmessage ' + (options.dataType || '');
449
- }
450
- } else {
451
- this._initIframeSettings(options);
452
- }
453
- },
454
-
455
- _getParamName: function (options) {
456
- var fileInput = $(options.fileInput),
457
- paramName = options.paramName;
458
- if (!paramName) {
459
- paramName = [];
460
- fileInput.each(function () {
461
- var input = $(this),
462
- name = input.prop('name') || 'files[]',
463
- i = (input.prop('files') || [1]).length;
464
- while (i) {
465
- paramName.push(name);
466
- i -= 1;
467
- }
468
- });
469
- if (!paramName.length) {
470
- paramName = [fileInput.prop('name') || 'files[]'];
471
- }
472
- } else if (!$.isArray(paramName)) {
473
- paramName = [paramName];
474
- }
475
- return paramName;
476
- },
477
-
478
- _initFormSettings: function (options) {
479
- // Retrieve missing options from the input field and the
480
- // associated form, if available:
481
- if (!options.form || !options.form.length) {
482
- options.form = $(options.fileInput.prop('form'));
483
- // If the given file input doesn't have an associated form,
484
- // use the default widget file input's form:
485
- if (!options.form.length) {
486
- options.form = $(this.options.fileInput.prop('form'));
487
- }
488
- }
489
- options.paramName = this._getParamName(options);
490
- if (!options.url) {
491
- options.url = options.form.prop('action') || location.href;
492
- }
493
- // The HTTP request method must be "POST" or "PUT":
494
- options.type = (options.type || options.form.prop('method') || '')
495
- .toUpperCase();
496
- if (options.type !== 'POST' && options.type !== 'PUT' &&
497
- options.type !== 'PATCH') {
498
- options.type = 'POST';
499
- }
500
- if (!options.formAcceptCharset) {
501
- options.formAcceptCharset = options.form.attr('accept-charset');
502
- }
503
- },
504
-
505
- _getAJAXSettings: function (data) {
506
- var options = $.extend({}, this.options, data);
507
- this._initFormSettings(options);
508
- this._initDataSettings(options);
509
- return options;
510
- },
511
-
512
- // jQuery 1.6 doesn't provide .state(),
513
- // while jQuery 1.8+ removed .isRejected() and .isResolved():
514
- _getDeferredState: function (deferred) {
515
- if (deferred.state) {
516
- return deferred.state();
517
- }
518
- if (deferred.isResolved()) {
519
- return 'resolved';
520
- }
521
- if (deferred.isRejected()) {
522
- return 'rejected';
523
- }
524
- return 'pending';
525
- },
526
-
527
- // Maps jqXHR callbacks to the equivalent
528
- // methods of the given Promise object:
529
- _enhancePromise: function (promise) {
530
- promise.success = promise.done;
531
- promise.error = promise.fail;
532
- promise.complete = promise.always;
533
- return promise;
534
- },
535
-
536
- // Creates and returns a Promise object enhanced with
537
- // the jqXHR methods abort, success, error and complete:
538
- _getXHRPromise: function (resolveOrReject, context, args) {
539
- var dfd = $.Deferred(),
540
- promise = dfd.promise();
541
- context = context || this.options.context || promise;
542
- if (resolveOrReject === true) {
543
- dfd.resolveWith(context, args);
544
- } else if (resolveOrReject === false) {
545
- dfd.rejectWith(context, args);
546
- }
547
- promise.abort = dfd.promise;
548
- return this._enhancePromise(promise);
549
- },
550
-
551
- // Adds convenience methods to the callback arguments:
552
- _addConvenienceMethods: function (e, data) {
553
- var that = this;
554
- data.submit = function () {
555
- if (this.state() !== 'pending') {
556
- data.jqXHR = this.jqXHR =
557
- (that._trigger('submit', e, this) !== false) &&
558
- that._onSend(e, this);
559
- }
560
- return this.jqXHR || that._getXHRPromise();
561
- };
562
- data.abort = function () {
563
- if (this.jqXHR) {
564
- return this.jqXHR.abort();
565
- }
566
- return that._getXHRPromise();
567
- };
568
- data.state = function () {
569
- if (this.jqXHR) {
570
- return that._getDeferredState(this.jqXHR);
571
- }
572
- };
573
- data.progress = function () {
574
- return this._progress;
575
- };
576
- data.response = function () {
577
- return this._response;
578
- };
579
- },
580
-
581
- // Parses the Range header from the server response
582
- // and returns the uploaded bytes:
583
- _getUploadedBytes: function (jqXHR) {
584
- var range = jqXHR.getResponseHeader('Range'),
585
- parts = range && range.split('-'),
586
- upperBytesPos = parts && parts.length > 1 &&
587
- parseInt(parts[1], 10);
588
- return upperBytesPos && upperBytesPos + 1;
589
- },
590
-
591
- // Uploads a file in multiple, sequential requests
592
- // by splitting the file up in multiple blob chunks.
593
- // If the second parameter is true, only tests if the file
594
- // should be uploaded in chunks, but does not invoke any
595
- // upload requests:
596
- _chunkedUpload: function (options, testOnly) {
597
- var that = this,
598
- file = options.files[0],
599
- fs = file.size,
600
- ub = options.uploadedBytes = options.uploadedBytes || 0,
601
- mcs = options.maxChunkSize || fs,
602
- slice = file.slice || file.webkitSlice || file.mozSlice,
603
- dfd = $.Deferred(),
604
- promise = dfd.promise(),
605
- jqXHR,
606
- upload;
607
- if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
608
- options.data) {
609
- return false;
610
- }
611
- if (testOnly) {
612
- return true;
613
- }
614
- if (ub >= fs) {
615
- file.error = 'Uploaded bytes exceed file size';
616
- return this._getXHRPromise(
617
- false,
618
- options.context,
619
- [null, 'error', file.error]
620
- );
621
- }
622
- // The chunk upload method:
623
- upload = function () {
624
- // Clone the options object for each chunk upload:
625
- var o = $.extend({}, options),
626
- currentLoaded = o._progress.loaded;
627
- o.blob = slice.call(
628
- file,
629
- ub,
630
- ub + mcs,
631
- file.type
632
- );
633
- // Store the current chunk size, as the blob itself
634
- // will be dereferenced after data processing:
635
- o.chunkSize = o.blob.size;
636
- // Expose the chunk bytes position range:
637
- o.contentRange = 'bytes ' + ub + '-' +
638
- (ub + o.chunkSize - 1) + '/' + fs;
639
- // Process the upload data (the blob and potential form data):
640
- that._initXHRData(o);
641
- // Add progress listeners for this chunk upload:
642
- that._initProgressListener(o);
643
- jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
644
- that._getXHRPromise(false, o.context))
645
- .done(function (result, textStatus, jqXHR) {
646
- ub = that._getUploadedBytes(jqXHR) ||
647
- (ub + o.chunkSize);
648
- // Create a progress event if no final progress event
649
- // with loaded equaling total has been triggered
650
- // for this chunk:
651
- if (o._progress.loaded === currentLoaded) {
652
- that._onProgress($.Event('progress', {
653
- lengthComputable: true,
654
- loaded: ub - o.uploadedBytes,
655
- total: ub - o.uploadedBytes
656
- }), o);
657
- }
658
- options.uploadedBytes = o.uploadedBytes = ub;
659
- o.result = result;
660
- o.textStatus = textStatus;
661
- o.jqXHR = jqXHR;
662
- that._trigger('chunkdone', null, o);
663
- that._trigger('chunkalways', null, o);
664
- if (ub < fs) {
665
- // File upload not yet complete,
666
- // continue with the next chunk:
667
- upload();
668
- } else {
669
- dfd.resolveWith(
670
- o.context,
671
- [result, textStatus, jqXHR]
672
- );
673
- }
674
- })
675
- .fail(function (jqXHR, textStatus, errorThrown) {
676
- o.jqXHR = jqXHR;
677
- o.textStatus = textStatus;
678
- o.errorThrown = errorThrown;
679
- that._trigger('chunkfail', null, o);
680
- that._trigger('chunkalways', null, o);
681
- dfd.rejectWith(
682
- o.context,
683
- [jqXHR, textStatus, errorThrown]
684
- );
685
- });
686
- };
687
- this._enhancePromise(promise);
688
- promise.abort = function () {
689
- return jqXHR.abort();
690
- };
691
- upload();
692
- return promise;
693
- },
694
-
695
- _beforeSend: function (e, data) {
696
- if (this._active === 0) {
697
- // the start callback is triggered when an upload starts
698
- // and no other uploads are currently running,
699
- // equivalent to the global ajaxStart event:
700
- this._trigger('start');
701
- // Set timer for global bitrate progress calculation:
702
- this._bitrateTimer = new this._BitrateTimer();
703
- // Reset the global progress values:
704
- this._progress.loaded = this._progress.total = 0;
705
- this._progress.bitrate = 0;
706
- }
707
- // Make sure the container objects for the .response() and
708
- // .progress() methods on the data object are available
709
- // and reset to their initial state:
710
- this._initResponseObject(data);
711
- this._initProgressObject(data);
712
- data._progress.loaded = data.loaded = data.uploadedBytes || 0;
713
- data._progress.total = data.total = this._getTotal(data.files) || 1;
714
- data._progress.bitrate = data.bitrate = 0;
715
- this._active += 1;
716
- // Initialize the global progress values:
717
- this._progress.loaded += data.loaded;
718
- this._progress.total += data.total;
719
- },
720
-
721
- _onDone: function (result, textStatus, jqXHR, options) {
722
- var total = options._progress.total,
723
- response = options._response;
724
- if (options._progress.loaded < total) {
725
- // Create a progress event if no final progress event
726
- // with loaded equaling total has been triggered:
727
- this._onProgress($.Event('progress', {
728
- lengthComputable: true,
729
- loaded: total,
730
- total: total
731
- }), options);
732
- }
733
- response.result = options.result = result;
734
- response.textStatus = options.textStatus = textStatus;
735
- response.jqXHR = options.jqXHR = jqXHR;
736
- this._trigger('done', null, options);
737
- },
738
-
739
- _onFail: function (jqXHR, textStatus, errorThrown, options) {
740
- var response = options._response;
741
- if (options.recalculateProgress) {
742
- // Remove the failed (error or abort) file upload from
743
- // the global progress calculation:
744
- this._progress.loaded -= options._progress.loaded;
745
- this._progress.total -= options._progress.total;
746
- }
747
- response.jqXHR = options.jqXHR = jqXHR;
748
- response.textStatus = options.textStatus = textStatus;
749
- response.errorThrown = options.errorThrown = errorThrown;
750
- this._trigger('fail', null, options);
751
- },
752
-
753
- _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {
754
- // jqXHRorResult, textStatus and jqXHRorError are added to the
755
- // options object via done and fail callbacks
756
- this._trigger('always', null, options);
757
- },
758
-
759
- _onSend: function (e, data) {
760
- if (!data.submit) {
761
- this._addConvenienceMethods(e, data);
762
- }
763
- var that = this,
764
- jqXHR,
765
- aborted,
766
- slot,
767
- pipe,
768
- options = that._getAJAXSettings(data),
769
- send = function () {
770
- that._sending += 1;
771
- // Set timer for bitrate progress calculation:
772
- options._bitrateTimer = new that._BitrateTimer();
773
- jqXHR = jqXHR || (
774
- ((aborted || that._trigger('send', e, options) === false) &&
775
- that._getXHRPromise(false, options.context, aborted)) ||
776
- that._chunkedUpload(options) || $.ajax(options)
777
- ).done(function (result, textStatus, jqXHR) {
778
- that._onDone(result, textStatus, jqXHR, options);
779
- }).fail(function (jqXHR, textStatus, errorThrown) {
780
- that._onFail(jqXHR, textStatus, errorThrown, options);
781
- }).always(function (jqXHRorResult, textStatus, jqXHRorError) {
782
- that._onAlways(
783
- jqXHRorResult,
784
- textStatus,
785
- jqXHRorError,
786
- options
787
- );
788
- that._sending -= 1;
789
- that._active -= 1;
790
- if (options.limitConcurrentUploads &&
791
- options.limitConcurrentUploads > that._sending) {
792
- // Start the next queued upload,
793
- // that has not been aborted:
794
- var nextSlot = that._slots.shift();
795
- while (nextSlot) {
796
- if (that._getDeferredState(nextSlot) === 'pending') {
797
- nextSlot.resolve();
798
- break;
799
- }
800
- nextSlot = that._slots.shift();
801
- }
802
- }
803
- if (that._active === 0) {
804
- // The stop callback is triggered when all uploads have
805
- // been completed, equivalent to the global ajaxStop event:
806
- that._trigger('stop');
807
- }
808
- });
809
- return jqXHR;
810
- };
811
- this._beforeSend(e, options);
812
- if (this.options.sequentialUploads ||
813
- (this.options.limitConcurrentUploads &&
814
- this.options.limitConcurrentUploads <= this._sending)) {
815
- if (this.options.limitConcurrentUploads > 1) {
816
- slot = $.Deferred();
817
- this._slots.push(slot);
818
- pipe = slot.pipe(send);
819
- } else {
820
- pipe = (this._sequence = this._sequence.pipe(send, send));
821
- }
822
- // Return the piped Promise object, enhanced with an abort method,
823
- // which is delegated to the jqXHR object of the current upload,
824
- // and jqXHR callbacks mapped to the equivalent Promise methods:
825
- pipe.abort = function () {
826
- aborted = [undefined, 'abort', 'abort'];
827
- if (!jqXHR) {
828
- if (slot) {
829
- slot.rejectWith(options.context, aborted);
830
- }
831
- return send();
832
- }
833
- return jqXHR.abort();
834
- };
835
- return this._enhancePromise(pipe);
836
- }
837
- return send();
838
- },
839
-
840
- _onAdd: function (e, data) {
841
- var that = this,
842
- result = true,
843
- options = $.extend({}, this.options, data),
844
- limit = options.limitMultiFileUploads,
845
- paramName = this._getParamName(options),
846
- paramNameSet,
847
- paramNameSlice,
848
- fileSet,
849
- i;
850
- if (!(options.singleFileUploads || limit) ||
851
- !this._isXHRUpload(options)) {
852
- fileSet = [data.files];
853
- paramNameSet = [paramName];
854
- } else if (!options.singleFileUploads && limit) {
855
- fileSet = [];
856
- paramNameSet = [];
857
- for (i = 0; i < data.files.length; i += limit) {
858
- fileSet.push(data.files.slice(i, i + limit));
859
- paramNameSlice = paramName.slice(i, i + limit);
860
- if (!paramNameSlice.length) {
861
- paramNameSlice = paramName;
862
- }
863
- paramNameSet.push(paramNameSlice);
864
- }
865
- } else {
866
- paramNameSet = paramName;
867
- }
868
- data.originalFiles = data.files;
869
- $.each(fileSet || data.files, function (index, element) {
870
- var newData = $.extend({}, data);
871
- newData.files = fileSet ? element : [element];
872
- newData.paramName = paramNameSet[index];
873
- that._initResponseObject(newData);
874
- that._initProgressObject(newData);
875
- that._addConvenienceMethods(e, newData);
876
- result = that._trigger('add', e, newData);
877
- return result;
878
  });
879
- return result;
880
- },
881
-
882
- _replaceFileInput: function (input) {
883
- var inputClone = input.clone(true);
884
- $('<form></form>').append(inputClone)[0].reset();
885
- // Detaching allows to insert the fileInput on another form
886
- // without loosing the file input value:
887
- input.after(inputClone).detach();
888
- // Avoid memory leaks with the detached file input:
889
- $.cleanData(input.unbind('remove'));
890
- // Replace the original file input element in the fileInput
891
- // elements set with the clone, which has been copied including
892
- // event handlers:
893
- this.options.fileInput = this.options.fileInput.map(function (i, el) {
894
- if (el === input[0]) {
895
- return inputClone[0];
896
- }
897
- return el;
898
  });
899
- // If the widget has been initialized on the file input itself,
900
- // override this.element with the file input clone:
901
- if (input[0] === this.element[0]) {
902
- this.element = inputClone;
903
- }
904
- },
905
-
906
- _handleFileTreeEntry: function (entry, path) {
907
- var that = this,
908
- dfd = $.Deferred(),
909
- errorHandler = function (e) {
910
- if (e && !e.entry) {
911
- e.entry = entry;
912
- }
913
- // Since $.when returns immediately if one
914
- // Deferred is rejected, we use resolve instead.
915
- // This allows valid files and invalid items
916
- // to be returned together in one set:
917
- dfd.resolve([e]);
918
- },
919
- dirReader;
920
- path = path || '';
921
- if (entry.isFile) {
922
- if (entry._file) {
923
- // Workaround for Chrome bug #149735
924
- entry._file.relativePath = path;
925
- dfd.resolve(entry._file);
926
- } else {
927
- entry.file(function (file) {
928
- file.relativePath = path;
929
- dfd.resolve(file);
930
- }, errorHandler);
931
  }
932
- } else if (entry.isDirectory) {
933
- dirReader = entry.createReader();
934
- dirReader.readEntries(function (entries) {
935
- that._handleFileTreeEntries(
936
- entries,
937
- path + entry.name + '/'
938
- ).done(function (files) {
939
- dfd.resolve(files);
940
- }).fail(errorHandler);
941
- }, errorHandler);
942
- } else {
943
- // Return an empy list for file system items
944
- // other than files or directories:
945
- dfd.resolve([]);
946
- }
947
- return dfd.promise();
948
- },
949
-
950
- _handleFileTreeEntries: function (entries, path) {
951
- var that = this;
952
- return $.when.apply(
953
- $,
954
- $.map(entries, function (entry) {
955
- return that._handleFileTreeEntry(entry, path);
956
- })
957
- ).pipe(function () {
958
- return Array.prototype.concat.apply(
959
- [],
960
- arguments
961
  );
 
962
  });
963
- },
964
-
965
- _getDroppedFiles: function (dataTransfer) {
966
- dataTransfer = dataTransfer || {};
967
- var items = dataTransfer.items;
968
- if (items && items.length && (items[0].webkitGetAsEntry ||
969
- items[0].getAsEntry)) {
970
- return this._handleFileTreeEntries(
971
- $.map(items, function (item) {
972
- var entry;
973
- if (item.webkitGetAsEntry) {
974
- entry = item.webkitGetAsEntry();
975
- if (entry) {
976
- // Workaround for Chrome bug #149735:
977
- entry._file = item.getAsFile();
978
- }
979
- return entry;
980
- }
981
- return item.getAsEntry();
982
- })
983
- );
984
- }
985
- return $.Deferred().resolve(
986
- $.makeArray(dataTransfer.files)
987
- ).promise();
988
- },
989
-
990
- _getSingleFileInputFiles: function (fileInput) {
991
- fileInput = $(fileInput);
992
- var entries = fileInput.prop('webkitEntries') ||
993
- fileInput.prop('entries'),
994
- files,
995
- value;
996
- if (entries && entries.length) {
997
- return this._handleFileTreeEntries(entries);
998
- }
999
- files = $.makeArray(fileInput.prop('files'));
1000
- if (!files.length) {
1001
- value = fileInput.prop('value');
1002
- if (!value) {
1003
- return $.Deferred().resolve([]).promise();
1004
- }
1005
- // If the files property is not available, the browser does not
1006
- // support the File API and we add a pseudo File object with
1007
- // the input value as name with path information removed:
1008
- files = [{name: value.replace(/^.*\\/, '')}];
1009
- } else if (files[0].name === undefined && files[0].fileName) {
1010
- // File normalization for Safari 4 and Firefox 3:
1011
- $.each(files, function (index, file) {
1012
- file.name = file.fileName;
1013
- file.size = file.fileSize;
1014
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1015
  }
1016
- return $.Deferred().resolve(files).promise();
1017
- },
1018
-
1019
- _getFileInputFiles: function (fileInput) {
1020
- if (!(fileInput instanceof $) || fileInput.length === 1) {
1021
- return this._getSingleFileInputFiles(fileInput);
 
 
 
 
 
 
1022
  }
1023
- return $.when.apply(
1024
- $,
1025
- $.map(fileInput, this._getSingleFileInputFiles)
1026
- ).pipe(function () {
1027
- return Array.prototype.concat.apply(
1028
- [],
1029
- arguments
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1030
  );
1031
- });
1032
- },
1033
-
1034
- _onChange: function (e) {
1035
- var that = this,
1036
- data = {
1037
- fileInput: $(e.target),
1038
- form: $(e.target.form)
1039
- };
1040
- this._getFileInputFiles(data.fileInput).always(function (files) {
1041
- data.files = files;
1042
- if (that.options.replaceFileInput) {
1043
- that._replaceFileInput(data.fileInput);
1044
- }
1045
- if (that._trigger('change', e, data) !== false) {
1046
- that._onAdd(e, data);
1047
- }
1048
- });
1049
- },
1050
-
1051
- _onPaste: function (e) {
1052
- var items = e.originalEvent && e.originalEvent.clipboardData &&
1053
- e.originalEvent.clipboardData.items,
1054
- data = {files: []};
1055
- if (items && items.length) {
1056
- $.each(items, function (index, item) {
1057
- var file = item.getAsFile && item.getAsFile();
1058
- if (file) {
1059
- data.files.push(file);
1060
  }
1061
- });
1062
- if (this._trigger('paste', e, data) === false ||
1063
- this._onAdd(e, data) === false) {
1064
- return false;
1065
  }
1066
- }
1067
- },
1068
-
1069
- _onDrop: function (e) {
1070
- var that = this,
1071
- dataTransfer = e.dataTransfer = e.originalEvent &&
1072
- e.originalEvent.dataTransfer,
1073
- data = {};
1074
- if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
1075
- e.preventDefault();
1076
- this._getDroppedFiles(dataTransfer).always(function (files) {
1077
- data.files = files;
1078
- if (that._trigger('drop', e, data) !== false) {
1079
- that._onAdd(e, data);
1080
- }
1081
- });
1082
- }
1083
- },
1084
-
1085
- _onDragOver: function (e) {
1086
- var dataTransfer = e.dataTransfer = e.originalEvent &&
1087
- e.originalEvent.dataTransfer;
1088
- if (dataTransfer) {
1089
- if (this._trigger('dragover', e) === false) {
1090
- return false;
1091
- }
1092
- if ($.inArray('Files', dataTransfer.types) !== -1) {
1093
- dataTransfer.dropEffect = 'copy';
1094
- e.preventDefault();
1095
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1096
  }
1097
- },
1098
-
1099
- _initEventHandlers: function () {
1100
- if (this._isXHRUpload(this.options)) {
1101
- this._on(this.options.dropZone, {
1102
- dragover: this._onDragOver,
1103
- drop: this._onDrop
1104
- });
1105
- this._on(this.options.pasteZone, {
1106
- paste: this._onPaste
1107
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1108
  }
1109
- this._on(this.options.fileInput, {
1110
- change: this._onChange
1111
- });
1112
- },
1113
-
1114
- _destroyEventHandlers: function () {
1115
- this._off(this.options.dropZone, 'dragover drop');
1116
- this._off(this.options.pasteZone, 'paste');
1117
- this._off(this.options.fileInput, 'change');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1118
  },
1119
-
1120
- _setOption: function (key, value) {
1121
- var refresh = $.inArray(key, this._refreshOptionsList) !== -1;
1122
- if (refresh) {
1123
- this._destroyEventHandlers();
1124
- }
1125
- this._super(key, value);
1126
- if (refresh) {
1127
- this._initSpecialOptions();
1128
- this._initEventHandlers();
1129
- }
1130
  },
1131
-
1132
- _initSpecialOptions: function () {
1133
- var options = this.options;
1134
- if (options.fileInput === undefined) {
1135
- options.fileInput = this.element.is('input[type="file"]') ?
1136
- this.element : this.element.find('input[type="file"]');
1137
- } else if (!(options.fileInput instanceof $)) {
1138
- options.fileInput = $(options.fileInput);
1139
- }
1140
- if (!(options.dropZone instanceof $)) {
1141
- options.dropZone = $(options.dropZone);
1142
  }
1143
- if (!(options.pasteZone instanceof $)) {
1144
- options.pasteZone = $(options.pasteZone);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1145
  }
1146
- },
1147
-
1148
- _create: function () {
1149
- var options = this.options;
1150
- // Initialize options set via HTML5 data-attributes:
1151
- $.extend(options, $(this.element[0].cloneNode(false)).data());
1152
- this._initSpecialOptions();
1153
- this._slots = [];
1154
- this._sequence = this._getXHRPromise(true);
1155
- this._sending = this._active = 0;
1156
- this._initProgressObject(this);
1157
- this._initEventHandlers();
1158
- },
1159
-
1160
- // This method is exposed to the widget API and allows to query
1161
- // the number of active uploads:
1162
- active: function () {
1163
- return this._active;
1164
- },
1165
-
1166
- // This method is exposed to the widget API and allows to query
1167
- // the widget upload progress.
1168
- // It returns an object with loaded, total and bitrate properties
1169
- // for the running uploads:
1170
- progress: function () {
1171
- return this._progress;
1172
- },
1173
-
1174
- // This method is exposed to the widget API and allows adding files
1175
- // using the fileupload API. The data parameter accepts an object which
1176
- // must have a files property and can contain additional options:
1177
- // .fileupload('add', {files: filesList});
1178
- add: function (data) {
1179
- var that = this;
1180
- if (!data || this.options.disabled) {
1181
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1182
  }
1183
- if (data.fileInput && !data.files) {
1184
- this._getFileInputFiles(data.fileInput).always(function (files) {
1185
- data.files = files;
1186
- that._onAdd(null, data);
1187
- });
1188
- } else {
1189
- data.files = $.makeArray(data.files);
1190
- this._onAdd(null, data);
1191
  }
1192
- },
1193
-
1194
- // This method is exposed to the widget API and allows sending files
1195
- // using the fileupload API. The data parameter accepts an object which
1196
- // must have a files or fileInput property and can contain additional options:
1197
- // .fileupload('send', {files: filesList});
1198
- // The method returns a Promise object for the file upload call.
1199
- send: function (data) {
1200
- if (data && !this.options.disabled) {
1201
- if (data.fileInput && !data.files) {
1202
- var that = this,
1203
- dfd = $.Deferred(),
1204
- promise = dfd.promise(),
1205
- jqXHR,
1206
- aborted;
1207
- promise.abort = function () {
1208
- aborted = true;
1209
- if (jqXHR) {
1210
- return jqXHR.abort();
1211
- }
1212
- dfd.reject(null, 'abort', 'abort');
1213
- return promise;
1214
- };
1215
- this._getFileInputFiles(data.fileInput).always(
1216
- function (files) {
1217
- if (aborted) {
1218
- return;
1219
- }
1220
- data.files = files;
1221
- jqXHR = that._onSend(null, data).then(
1222
- function (result, textStatus, jqXHR) {
1223
- dfd.resolve(result, textStatus, jqXHR);
1224
- },
1225
- function (jqXHR, textStatus, errorThrown) {
1226
- dfd.reject(jqXHR, textStatus, errorThrown);
1227
- }
1228
- );
1229
- }
1230
- );
1231
- return this._enhancePromise(promise);
1232
- }
1233
- data.files = $.makeArray(data.files);
1234
- if (data.files.length) {
1235
- return this._onSend(null, data);
1236
- }
1237
  }
1238
- return this._getXHRPromise(false, data && data.context);
 
 
 
 
 
 
 
 
 
 
 
1239
  }
1240
-
1241
- });
1242
-
1243
- }));
 
 
 
 
 
1
  /*
2
+ * jQuery File Upload Plugin
3
  * https://github.com/blueimp/jQuery-File-Upload
4
  *
5
  * Copyright 2010, Sebastian Tschan
6
  * https://blueimp.net
7
  *
8
  * Licensed under the MIT license:
9
+ * https://opensource.org/licenses/MIT
10
  */
11
 
12
+ /* global define, require */
13
+ /* eslint-disable new-cap */
14
+
15
+ (function(factory) {
16
+ 'use strict';
17
+ if (typeof define === 'function' && define.amd) {
18
+ // Register as an anonymous AMD module:
19
+ define(['jquery', 'jquery-ui/ui/widget'], factory);
20
+ } else if (typeof exports === 'object') {
21
+ // Node/CommonJS:
22
+ factory(require('jquery'), require('./vendor/jquery.ui.widget'));
23
+ } else {
24
+ // Browser globals:
25
+ factory(window.jQuery);
26
+ }
27
+ })(function($) {
28
+ 'use strict';
29
+
30
+ // Detect file input support, based on
31
+ // https://viljamis.com/2012/file-upload-support-on-mobile/
32
+ $.support.fileInput = !(
33
+ new RegExp(
34
+ // Handle devices which give false positives for the feature detection:
35
+ '(Android (1\\.[0156]|2\\.[01]))' +
36
+ '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +
37
+ '|(w(eb)?OSBrowser)|(webOS)' +
38
+ '|(Kindle/(1\\.0|2\\.[05]|3\\.0))'
39
+ ).test(window.navigator.userAgent) ||
40
+ // Feature detection for all other devices:
41
+ $('<input type="file"/>').prop('disabled')
42
+ );
43
+
44
+ // The FileReader API is not actually used, but works as feature detection,
45
+ // as some Safari versions (5?) support XHR file uploads via the FormData API,
46
+ // but not non-multipart XHR file uploads.
47
+ // window.XMLHttpRequestUpload is not available on IE10, so we check for
48
+ // window.ProgressEvent instead to detect XHR2 file upload capability:
49
+ $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);
50
+ $.support.xhrFormDataFileUpload = !!window.FormData;
51
+
52
+ // Detect support for Blob slicing (required for chunked uploads):
53
+ $.support.blobSlice =
54
+ window.Blob &&
55
+ (Blob.prototype.slice ||
56
+ Blob.prototype.webkitSlice ||
57
+ Blob.prototype.mozSlice);
58
+
59
+ /**
60
+ * Helper function to create drag handlers for dragover/dragenter/dragleave
61
+ *
62
+ * @param {string} type Event type
63
+ * @returns {Function} Drag handler
64
+ */
65
+ function getDragHandler(type) {
66
+ var isDragOver = type === 'dragover';
67
+ return function(e) {
68
+ e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
69
+ var dataTransfer = e.dataTransfer;
70
+ if (
71
+ dataTransfer &&
72
+ $.inArray('Files', dataTransfer.types) !== -1 &&
73
+ this._trigger(type, $.Event(type, { delegatedEvent: e })) !== false
74
+ ) {
75
+ e.preventDefault();
76
+ if (isDragOver) {
77
+ dataTransfer.dropEffect = 'copy';
78
+ }
79
+ }
80
+ };
81
+ }
82
+
83
+ // The fileupload widget listens for change events on file input fields defined
84
+ // via fileInput setting and paste or drop events of the given dropZone.
85
+ // In addition to the default jQuery Widget methods, the fileupload widget
86
+ // exposes the "add" and "send" methods, to add or directly send files using
87
+ // the fileupload API.
88
+ // By default, files added via file input selection, paste, drag & drop or
89
+ // "add" method are uploaded immediately, but it is possible to override
90
+ // the "add" callback option to queue file uploads.
91
+ $.widget('blueimp.fileupload', {
92
+ options: {
93
+ // The drop target element(s), by the default the complete document.
94
+ // Set to null to disable drag & drop support:
95
+ dropZone: $(document),
96
+ // The paste target element(s), by the default undefined.
97
+ // Set to a DOM node or jQuery object to enable file pasting:
98
+ pasteZone: undefined,
99
+ // The file input field(s), that are listened to for change events.
100
+ // If undefined, it is set to the file input fields inside
101
+ // of the widget element on plugin initialization.
102
+ // Set to null to disable the change listener.
103
+ fileInput: undefined,
104
+ // By default, the file input field is replaced with a clone after
105
+ // each input field change event. This is required for iframe transport
106
+ // queues and allows change events to be fired for the same file
107
+ // selection, but can be disabled by setting the following option to false:
108
+ replaceFileInput: true,
109
+ // The parameter name for the file form data (the request argument name).
110
+ // If undefined or empty, the name property of the file input field is
111
+ // used, or "files[]" if the file input name property is also empty,
112
+ // can be a string or an array of strings:
113
+ paramName: undefined,
114
+ // By default, each file of a selection is uploaded using an individual
115
+ // request for XHR type uploads. Set to false to upload file
116
+ // selections in one request each:
117
+ singleFileUploads: true,
118
+ // To limit the number of files uploaded with one XHR request,
119
+ // set the following option to an integer greater than 0:
120
+ limitMultiFileUploads: undefined,
121
+ // The following option limits the number of files uploaded with one
122
+ // XHR request to keep the request size under or equal to the defined
123
+ // limit in bytes:
124
+ limitMultiFileUploadSize: undefined,
125
+ // Multipart file uploads add a number of bytes to each uploaded file,
126
+ // therefore the following option adds an overhead for each file used
127
+ // in the limitMultiFileUploadSize configuration:
128
+ limitMultiFileUploadSizeOverhead: 512,
129
+ // Set the following option to true to issue all file upload requests
130
+ // in a sequential order:
131
+ sequentialUploads: false,
132
+ // To limit the number of concurrent uploads,
133
+ // set the following option to an integer greater than 0:
134
+ limitConcurrentUploads: undefined,
135
+ // Set the following option to true to force iframe transport uploads:
136
+ forceIframeTransport: false,
137
+ // Set the following option to the location of a redirect url on the
138
+ // origin server, for cross-domain iframe transport uploads:
139
+ redirect: undefined,
140
+ // The parameter name for the redirect url, sent as part of the form
141
+ // data and set to 'redirect' if this option is empty:
142
+ redirectParamName: undefined,
143
+ // Set the following option to the location of a postMessage window,
144
+ // to enable postMessage transport uploads:
145
+ postMessage: undefined,
146
+ // By default, XHR file uploads are sent as multipart/form-data.
147
+ // The iframe transport is always using multipart/form-data.
148
+ // Set to false to enable non-multipart XHR uploads:
149
+ multipart: true,
150
+ // To upload large files in smaller chunks, set the following option
151
+ // to a preferred maximum chunk size. If set to 0, null or undefined,
152
+ // or the browser does not support the required Blob API, files will
153
+ // be uploaded as a whole.
154
+ maxChunkSize: undefined,
155
+ // When a non-multipart upload or a chunked multipart upload has been
156
+ // aborted, this option can be used to resume the upload by setting
157
+ // it to the size of the already uploaded bytes. This option is most
158
+ // useful when modifying the options object inside of the "add" or
159
+ // "send" callbacks, as the options are cloned for each file upload.
160
+ uploadedBytes: undefined,
161
+ // By default, failed (abort or error) file uploads are removed from the
162
+ // global progress calculation. Set the following option to false to
163
+ // prevent recalculating the global progress data:
164
+ recalculateProgress: true,
165
+ // Interval in milliseconds to calculate and trigger progress events:
166
+ progressInterval: 100,
167
+ // Interval in milliseconds to calculate progress bitrate:
168
+ bitrateInterval: 500,
169
+ // By default, uploads are started automatically when adding files:
170
+ autoUpload: true,
171
+ // By default, duplicate file names are expected to be handled on
172
+ // the server-side. If this is not possible (e.g. when uploading
173
+ // files directly to Amazon S3), the following option can be set to
174
+ // an empty object or an object mapping existing filenames, e.g.:
175
+ // { "image.jpg": true, "image (1).jpg": true }
176
+ // If it is set, all files will be uploaded with unique filenames,
177
+ // adding increasing number suffixes if necessary, e.g.:
178
+ // "image (2).jpg"
179
+ uniqueFilenames: undefined,
180
+
181
+ // Error and info messages:
182
+ messages: {
183
+ uploadedBytes: 'Uploaded bytes exceed file size'
184
+ },
185
+
186
+ // Translation function, gets the message key to be translated
187
+ // and an object with context specific data as arguments:
188
+ i18n: function(message, context) {
189
+ // eslint-disable-next-line no-param-reassign
190
+ message = this.messages[message] || message.toString();
191
+ if (context) {
192
+ $.each(context, function(key, value) {
193
+ // eslint-disable-next-line no-param-reassign
194
+ message = message.replace('{' + key + '}', value);
195
+ });
196
+ }
197
+ return message;
198
+ },
199
+
200
+ // Additional form data to be sent along with the file uploads can be set
201
+ // using this option, which accepts an array of objects with name and
202
+ // value properties, a function returning such an array, a FormData
203
+ // object (for XHR file uploads), or a simple object.
204
+ // The form of the first fileInput is given as parameter to the function:
205
+ formData: function(form) {
206
+ return form.serializeArray();
207
+ },
208
+
209
+ // The add callback is invoked as soon as files are added to the fileupload
210
+ // widget (via file input selection, drag & drop, paste or add API call).
211
+ // If the singleFileUploads option is enabled, this callback will be
212
+ // called once for each file in the selection for XHR file uploads, else
213
+ // once for each file selection.
214
+ //
215
+ // The upload starts when the submit method is invoked on the data parameter.
216
+ // The data object contains a files property holding the added files
217
+ // and allows you to override plugin options as well as define ajax settings.
218
+ //
219
+ // Listeners for this callback can also be bound the following way:
220
+ // .bind('fileuploadadd', func);
221
+ //
222
+ // data.submit() returns a Promise object and allows to attach additional
223
+ // handlers using jQuery's Deferred callbacks:
224
+ // data.submit().done(func).fail(func).always(func);
225
+ add: function(e, data) {
226
+ if (e.isDefaultPrevented()) {
227
+ return false;
228
+ }
229
+ if (
230
+ data.autoUpload ||
231
+ (data.autoUpload !== false &&
232
+ $(this).fileupload('option', 'autoUpload'))
233
+ ) {
234
+ data.process().done(function() {
235
+ data.submit();
236
+ });
237
+ }
238
+ },
239
 
240
+ // Other callbacks:
241
 
242
+ // Callback for the submit event of each file upload:
243
+ // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);
244
 
245
+ // Callback for the start of each file upload request:
246
+ // send: function (e, data) {}, // .bind('fileuploadsend', func);
247
 
248
+ // Callback for successful uploads:
249
+ // done: function (e, data) {}, // .bind('fileuploaddone', func);
250
 
251
+ // Callback for failed (abort or error) uploads:
252
+ // fail: function (e, data) {}, // .bind('fileuploadfail', func);
253
 
254
+ // Callback for completed (success, abort or error) requests:
255
+ // always: function (e, data) {}, // .bind('fileuploadalways', func);
256
 
257
+ // Callback for upload progress events:
258
+ // progress: function (e, data) {}, // .bind('fileuploadprogress', func);
259
 
260
+ // Callback for global upload progress events:
261
+ // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
262
 
263
+ // Callback for uploads start, equivalent to the global ajaxStart event:
264
+ // start: function (e) {}, // .bind('fileuploadstart', func);
265
 
266
+ // Callback for uploads stop, equivalent to the global ajaxStop event:
267
+ // stop: function (e) {}, // .bind('fileuploadstop', func);
268
 
269
+ // Callback for change events of the fileInput(s):
270
+ // change: function (e, data) {}, // .bind('fileuploadchange', func);
271
 
272
+ // Callback for paste events to the pasteZone(s):
273
+ // paste: function (e, data) {}, // .bind('fileuploadpaste', func);
274
 
275
+ // Callback for drop events of the dropZone(s):
276
+ // drop: function (e, data) {}, // .bind('fileuploaddrop', func);
277
 
278
+ // Callback for dragover events of the dropZone(s):
279
+ // dragover: function (e) {}, // .bind('fileuploaddragover', func);
280
 
281
+ // Callback before the start of each chunk upload request (before form data initialization):
282
+ // chunkbeforesend: function (e, data) {}, // .bind('fileuploadchunkbeforesend', func);
283
 
284
+ // Callback for the start of each chunk upload request:
285
+ // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);
286
 
287
+ // Callback for successful chunk uploads:
288
+ // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);
289
 
290
+ // Callback for failed (abort or error) chunk uploads:
291
+ // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);
292
 
293
+ // Callback for completed (success, abort or error) chunk upload requests:
294
+ // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);
 
 
 
 
295
 
296
+ // The plugin options are used as settings object for the ajax calls.
297
+ // The following are jQuery ajax settings required for the file uploads:
298
+ processData: false,
299
+ contentType: false,
300
+ cache: false,
301
+ timeout: 0
302
+ },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
 
304
+ // A list of options that require reinitializing event listeners and/or
305
+ // special initialization code:
306
+ _specialOptions: [
307
+ 'fileInput',
308
+ 'dropZone',
309
+ 'pasteZone',
310
+ 'multipart',
311
+ 'forceIframeTransport'
312
+ ],
313
 
314
+ _blobSlice:
315
+ $.support.blobSlice &&
316
+ function() {
317
+ var slice = this.slice || this.webkitSlice || this.mozSlice;
318
+ return slice.apply(this, arguments);
319
+ },
 
 
 
 
 
 
 
 
 
 
 
320
 
321
+ _BitrateTimer: function() {
322
+ this.timestamp = Date.now ? Date.now() : new Date().getTime();
323
+ this.loaded = 0;
324
+ this.bitrate = 0;
325
+ this.getBitrate = function(now, loaded, interval) {
326
+ var timeDiff = now - this.timestamp;
327
+ if (!this.bitrate || !interval || timeDiff > interval) {
328
+ this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;
329
+ this.loaded = loaded;
330
+ this.timestamp = now;
331
+ }
332
+ return this.bitrate;
333
+ };
334
+ },
335
+
336
+ _isXHRUpload: function(options) {
337
+ return (
338
+ !options.forceIframeTransport &&
339
+ ((!options.multipart && $.support.xhrFileUpload) ||
340
+ $.support.xhrFormDataFileUpload)
341
+ );
342
+ },
343
+
344
+ _getFormData: function(options) {
345
+ var formData;
346
+ if ($.type(options.formData) === 'function') {
347
+ return options.formData(options.form);
348
+ }
349
+ if ($.isArray(options.formData)) {
350
+ return options.formData;
351
+ }
352
+ if ($.type(options.formData) === 'object') {
353
+ formData = [];
354
+ $.each(options.formData, function(name, value) {
355
+ formData.push({ name: name, value: value });
356
+ });
357
+ return formData;
358
+ }
359
+ return [];
360
+ },
361
+
362
+ _getTotal: function(files) {
363
+ var total = 0;
364
+ $.each(files, function(index, file) {
365
+ total += file.size || 1;
366
+ });
367
+ return total;
368
+ },
369
+
370
+ _initProgressObject: function(obj) {
371
+ var progress = {
372
+ loaded: 0,
373
+ total: 0,
374
+ bitrate: 0
375
+ };
376
+ if (obj._progress) {
377
+ $.extend(obj._progress, progress);
378
+ } else {
379
+ obj._progress = progress;
380
+ }
381
+ },
382
+
383
+ _initResponseObject: function(obj) {
384
+ var prop;
385
+ if (obj._response) {
386
+ for (prop in obj._response) {
387
+ if (Object.prototype.hasOwnProperty.call(obj._response, prop)) {
388
+ delete obj._response[prop];
389
+ }
390
+ }
391
+ } else {
392
+ obj._response = {};
393
+ }
394
+ },
395
+
396
+ _onProgress: function(e, data) {
397
+ if (e.lengthComputable) {
398
+ var now = Date.now ? Date.now() : new Date().getTime(),
399
+ loaded;
400
+ if (
401
+ data._time &&
402
+ data.progressInterval &&
403
+ now - data._time < data.progressInterval &&
404
+ e.loaded !== e.total
405
+ ) {
406
+ return;
407
+ }
408
+ data._time = now;
409
+ loaded =
410
+ Math.floor(
411
+ (e.loaded / e.total) * (data.chunkSize || data._progress.total)
412
+ ) + (data.uploadedBytes || 0);
413
+ // Add the difference from the previously loaded state
414
+ // to the global loaded counter:
415
+ this._progress.loaded += loaded - data._progress.loaded;
416
+ this._progress.bitrate = this._bitrateTimer.getBitrate(
417
+ now,
418
+ this._progress.loaded,
419
+ data.bitrateInterval
420
+ );
421
+ data._progress.loaded = data.loaded = loaded;
422
+ data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(
423
+ now,
424
+ loaded,
425
+ data.bitrateInterval
426
+ );
427
+ // Trigger a custom progress event with a total data property set
428
+ // to the file size(s) of the current upload and a loaded data
429
+ // property calculated accordingly:
430
+ this._trigger(
431
+ 'progress',
432
+ $.Event('progress', { delegatedEvent: e }),
433
+ data
434
+ );
435
+ // Trigger a global progress event for all current file uploads,
436
+ // including ajax calls queued for sequential file uploads:
437
+ this._trigger(
438
+ 'progressall',
439
+ $.Event('progressall', { delegatedEvent: e }),
440
+ this._progress
441
+ );
442
+ }
443
+ },
444
+
445
+ _initProgressListener: function(options) {
446
+ var that = this,
447
+ xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
448
+ // Accesss to the native XHR object is required to add event listeners
449
+ // for the upload progress event:
450
+ if (xhr.upload) {
451
+ $(xhr.upload).bind('progress', function(e) {
452
+ var oe = e.originalEvent;
453
+ // Make sure the progress event properties get copied over:
454
+ e.lengthComputable = oe.lengthComputable;
455
+ e.loaded = oe.loaded;
456
+ e.total = oe.total;
457
+ that._onProgress(e, options);
458
+ });
459
+ options.xhr = function() {
460
+ return xhr;
461
+ };
462
+ }
463
+ },
464
+
465
+ _deinitProgressListener: function(options) {
466
+ var xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
467
+ if (xhr.upload) {
468
+ $(xhr.upload).unbind('progress');
469
+ }
470
+ },
471
+
472
+ _isInstanceOf: function(type, obj) {
473
+ // Cross-frame instanceof check
474
+ return Object.prototype.toString.call(obj) === '[object ' + type + ']';
475
+ },
476
+
477
+ _getUniqueFilename: function(name, map) {
478
+ // eslint-disable-next-line no-param-reassign
479
+ name = String(name);
480
+ if (map[name]) {
481
+ // eslint-disable-next-line no-param-reassign
482
+ name = name.replace(/(?: \(([\d]+)\))?(\.[^.]+)?$/, function(
483
+ _,
484
+ p1,
485
+ p2
486
+ ) {
487
+ var index = p1 ? Number(p1) + 1 : 1;
488
+ var ext = p2 || '';
489
+ return ' (' + index + ')' + ext;
490
+ });
491
+ return this._getUniqueFilename(name, map);
492
+ }
493
+ map[name] = true;
494
+ return name;
495
+ },
496
+
497
+ _initXHRData: function(options) {
498
+ var that = this,
499
+ formData,
500
+ file = options.files[0],
501
+ // Ignore non-multipart setting if not supported:
502
+ multipart = options.multipart || !$.support.xhrFileUpload,
503
+ paramName =
504
+ $.type(options.paramName) === 'array'
505
+ ? options.paramName[0]
506
+ : options.paramName;
507
+ options.headers = $.extend({}, options.headers);
508
+ if (options.contentRange) {
509
+ options.headers['Content-Range'] = options.contentRange;
510
+ }
511
+ if (!multipart || options.blob || !this._isInstanceOf('File', file)) {
512
+ options.headers['Content-Disposition'] =
513
+ 'attachment; filename="' +
514
+ encodeURI(file.uploadName || file.name) +
515
+ '"';
516
+ }
517
+ if (!multipart) {
518
+ options.contentType = file.type || 'application/octet-stream';
519
+ options.data = options.blob || file;
520
+ } else if ($.support.xhrFormDataFileUpload) {
521
+ if (options.postMessage) {
522
+ // window.postMessage does not allow sending FormData
523
+ // objects, so we just add the File/Blob objects to
524
+ // the formData array and let the postMessage window
525
+ // create the FormData object out of this array:
526
+ formData = this._getFormData(options);
527
+ if (options.blob) {
528
+ formData.push({
529
+ name: paramName,
530
+ value: options.blob
531
  });
532
+ } else {
533
+ $.each(options.files, function(index, file) {
534
+ formData.push({
535
+ name:
536
+ ($.type(options.paramName) === 'array' &&
537
+ options.paramName[index]) ||
538
+ paramName,
539
+ value: file
540
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
541
  });
542
+ }
543
+ } else {
544
+ if (that._isInstanceOf('FormData', options.formData)) {
545
+ formData = options.formData;
546
+ } else {
547
+ formData = new FormData();
548
+ $.each(this._getFormData(options), function(index, field) {
549
+ formData.append(field.name, field.value);
 
 
 
 
 
 
 
 
 
 
 
550
  });
551
+ }
552
+ if (options.blob) {
553
+ formData.append(
554
+ paramName,
555
+ options.blob,
556
+ file.uploadName || file.name
557
+ );
558
+ } else {
559
+ $.each(options.files, function(index, file) {
560
+ // This check allows the tests to run with
561
+ // dummy objects:
562
+ if (
563
+ that._isInstanceOf('File', file) ||
564
+ that._isInstanceOf('Blob', file)
565
+ ) {
566
+ var fileName = file.uploadName || file.name;
567
+ if (options.uniqueFilenames) {
568
+ fileName = that._getUniqueFilename(
569
+ fileName,
570
+ options.uniqueFilenames
571
+ );
 
 
 
 
 
 
 
 
 
 
 
572
  }
573
+ formData.append(
574
+ ($.type(options.paramName) === 'array' &&
575
+ options.paramName[index]) ||
576
+ paramName,
577
+ file,
578
+ fileName
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  );
580
+ }
581
  });
582
+ }
583
+ }
584
+ options.data = formData;
585
+ }
586
+ // Blob reference is not needed anymore, free memory:
587
+ options.blob = null;
588
+ },
589
+
590
+ _initIframeSettings: function(options) {
591
+ var targetHost = $('<a></a>')
592
+ .prop('href', options.url)
593
+ .prop('host');
594
+ // Setting the dataType to iframe enables the iframe transport:
595
+ options.dataType = 'iframe ' + (options.dataType || '');
596
+ // The iframe transport accepts a serialized array as form data:
597
+ options.formData = this._getFormData(options);
598
+ // Add redirect url to form data on cross-domain uploads:
599
+ if (options.redirect && targetHost && targetHost !== location.host) {
600
+ options.formData.push({
601
+ name: options.redirectParamName || 'redirect',
602
+ value: options.redirect
603
+ });
604
+ }
605
+ },
606
+
607
+ _initDataSettings: function(options) {
608
+ if (this._isXHRUpload(options)) {
609
+ if (!this._chunkedUpload(options, true)) {
610
+ if (!options.data) {
611
+ this._initXHRData(options);
612
+ }
613
+ this._initProgressListener(options);
614
+ }
615
+ if (options.postMessage) {
616
+ // Setting the dataType to postmessage enables the
617
+ // postMessage transport:
618
+ options.dataType = 'postmessage ' + (options.dataType || '');
619
+ }
620
+ } else {
621
+ this._initIframeSettings(options);
622
+ }
623
+ },
624
+
625
+ _getParamName: function(options) {
626
+ var fileInput = $(options.fileInput),
627
+ paramName = options.paramName;
628
+ if (!paramName) {
629
+ paramName = [];
630
+ fileInput.each(function() {
631
+ var input = $(this),
632
+ name = input.prop('name') || 'files[]',
633
+ i = (input.prop('files') || [1]).length;
634
+ while (i) {
635
+ paramName.push(name);
636
+ i -= 1;
637
+ }
638
+ });
639
+ if (!paramName.length) {
640
+ paramName = [fileInput.prop('name') || 'files[]'];
641
+ }
642
+ } else if (!$.isArray(paramName)) {
643
+ paramName = [paramName];
644
+ }
645
+ return paramName;
646
+ },
647
+
648
+ _initFormSettings: function(options) {
649
+ // Retrieve missing options from the input field and the
650
+ // associated form, if available:
651
+ if (!options.form || !options.form.length) {
652
+ options.form = $(options.fileInput.prop('form'));
653
+ // If the given file input doesn't have an associated form,
654
+ // use the default widget file input's form:
655
+ if (!options.form.length) {
656
+ options.form = $(this.options.fileInput.prop('form'));
657
+ }
658
+ }
659
+ options.paramName = this._getParamName(options);
660
+ if (!options.url) {
661
+ options.url = options.form.prop('action') || location.href;
662
+ }
663
+ // The HTTP request method must be "POST" or "PUT":
664
+ options.type = (
665
+ options.type ||
666
+ ($.type(options.form.prop('method')) === 'string' &&
667
+ options.form.prop('method')) ||
668
+ ''
669
+ ).toUpperCase();
670
+ if (
671
+ options.type !== 'POST' &&
672
+ options.type !== 'PUT' &&
673
+ options.type !== 'PATCH'
674
+ ) {
675
+ options.type = 'POST';
676
+ }
677
+ if (!options.formAcceptCharset) {
678
+ options.formAcceptCharset = options.form.attr('accept-charset');
679
+ }
680
+ },
681
+
682
+ _getAJAXSettings: function(data) {
683
+ var options = $.extend({}, this.options, data);
684
+ this._initFormSettings(options);
685
+ this._initDataSettings(options);
686
+ return options;
687
+ },
688
+
689
+ // jQuery 1.6 doesn't provide .state(),
690
+ // while jQuery 1.8+ removed .isRejected() and .isResolved():
691
+ _getDeferredState: function(deferred) {
692
+ if (deferred.state) {
693
+ return deferred.state();
694
+ }
695
+ if (deferred.isResolved()) {
696
+ return 'resolved';
697
+ }
698
+ if (deferred.isRejected()) {
699
+ return 'rejected';
700
+ }
701
+ return 'pending';
702
+ },
703
+
704
+ // Maps jqXHR callbacks to the equivalent
705
+ // methods of the given Promise object:
706
+ _enhancePromise: function(promise) {
707
+ promise.success = promise.done;
708
+ promise.error = promise.fail;
709
+ promise.complete = promise.always;
710
+ return promise;
711
+ },
712
+
713
+ // Creates and returns a Promise object enhanced with
714
+ // the jqXHR methods abort, success, error and complete:
715
+ _getXHRPromise: function(resolveOrReject, context, args) {
716
+ var dfd = $.Deferred(),
717
+ promise = dfd.promise();
718
+ // eslint-disable-next-line no-param-reassign
719
+ context = context || this.options.context || promise;
720
+ if (resolveOrReject === true) {
721
+ dfd.resolveWith(context, args);
722
+ } else if (resolveOrReject === false) {
723
+ dfd.rejectWith(context, args);
724
+ }
725
+ promise.abort = dfd.promise;
726
+ return this._enhancePromise(promise);
727
+ },
728
+
729
+ // Adds convenience methods to the data callback argument:
730
+ _addConvenienceMethods: function(e, data) {
731
+ var that = this,
732
+ getPromise = function(args) {
733
+ return $.Deferred()
734
+ .resolveWith(that, args)
735
+ .promise();
736
+ };
737
+ data.process = function(resolveFunc, rejectFunc) {
738
+ if (resolveFunc || rejectFunc) {
739
+ data._processQueue = this._processQueue = (
740
+ this._processQueue || getPromise([this])
741
+ )
742
+ .then(function() {
743
+ if (data.errorThrown) {
744
+ return $.Deferred()
745
+ .rejectWith(that, [data])
746
+ .promise();
747
+ }
748
+ return getPromise(arguments);
749
+ })
750
+ .then(resolveFunc, rejectFunc);
751
+ }
752
+ return this._processQueue || getPromise([this]);
753
+ };
754
+ data.submit = function() {
755
+ if (this.state() !== 'pending') {
756
+ data.jqXHR = this.jqXHR =
757
+ that._trigger(
758
+ 'submit',
759
+ $.Event('submit', { delegatedEvent: e }),
760
+ this
761
+ ) !== false && that._onSend(e, this);
762
+ }
763
+ return this.jqXHR || that._getXHRPromise();
764
+ };
765
+ data.abort = function() {
766
+ if (this.jqXHR) {
767
+ return this.jqXHR.abort();
768
+ }
769
+ this.errorThrown = 'abort';
770
+ that._trigger('fail', null, this);
771
+ return that._getXHRPromise(false);
772
+ };
773
+ data.state = function() {
774
+ if (this.jqXHR) {
775
+ return that._getDeferredState(this.jqXHR);
776
+ }
777
+ if (this._processQueue) {
778
+ return that._getDeferredState(this._processQueue);
779
+ }
780
+ };
781
+ data.processing = function() {
782
+ return (
783
+ !this.jqXHR &&
784
+ this._processQueue &&
785
+ that._getDeferredState(this._processQueue) === 'pending'
786
+ );
787
+ };
788
+ data.progress = function() {
789
+ return this._progress;
790
+ };
791
+ data.response = function() {
792
+ return this._response;
793
+ };
794
+ },
795
+
796
+ // Parses the Range header from the server response
797
+ // and returns the uploaded bytes:
798
+ _getUploadedBytes: function(jqXHR) {
799
+ var range = jqXHR.getResponseHeader('Range'),
800
+ parts = range && range.split('-'),
801
+ upperBytesPos = parts && parts.length > 1 && parseInt(parts[1], 10);
802
+ return upperBytesPos && upperBytesPos + 1;
803
+ },
804
+
805
+ // Uploads a file in multiple, sequential requests
806
+ // by splitting the file up in multiple blob chunks.
807
+ // If the second parameter is true, only tests if the file
808
+ // should be uploaded in chunks, but does not invoke any
809
+ // upload requests:
810
+ _chunkedUpload: function(options, testOnly) {
811
+ options.uploadedBytes = options.uploadedBytes || 0;
812
+ var that = this,
813
+ file = options.files[0],
814
+ fs = file.size,
815
+ ub = options.uploadedBytes,
816
+ mcs = options.maxChunkSize || fs,
817
+ slice = this._blobSlice,
818
+ dfd = $.Deferred(),
819
+ promise = dfd.promise(),
820
+ jqXHR,
821
+ upload;
822
+ if (
823
+ !(
824
+ this._isXHRUpload(options) &&
825
+ slice &&
826
+ (ub || ($.type(mcs) === 'function' ? mcs(options) : mcs) < fs)
827
+ ) ||
828
+ options.data
829
+ ) {
830
+ return false;
831
+ }
832
+ if (testOnly) {
833
+ return true;
834
+ }
835
+ if (ub >= fs) {
836
+ file.error = options.i18n('uploadedBytes');
837
+ return this._getXHRPromise(false, options.context, [
838
+ null,
839
+ 'error',
840
+ file.error
841
+ ]);
842
+ }
843
+ // The chunk upload method:
844
+ upload = function() {
845
+ // Clone the options object for each chunk upload:
846
+ var o = $.extend({}, options),
847
+ currentLoaded = o._progress.loaded;
848
+ o.blob = slice.call(
849
+ file,
850
+ ub,
851
+ ub + ($.type(mcs) === 'function' ? mcs(o) : mcs),
852
+ file.type
853
+ );
854
+ // Store the current chunk size, as the blob itself
855
+ // will be dereferenced after data processing:
856
+ o.chunkSize = o.blob.size;
857
+ // Expose the chunk bytes position range:
858
+ o.contentRange =
859
+ 'bytes ' + ub + '-' + (ub + o.chunkSize - 1) + '/' + fs;
860
+ // Trigger chunkbeforesend to allow form data to be updated for this chunk
861
+ that._trigger('chunkbeforesend', null, o);
862
+ // Process the upload data (the blob and potential form data):
863
+ that._initXHRData(o);
864
+ // Add progress listeners for this chunk upload:
865
+ that._initProgressListener(o);
866
+ jqXHR = (
867
+ (that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||
868
+ that._getXHRPromise(false, o.context)
869
+ )
870
+ .done(function(result, textStatus, jqXHR) {
871
+ ub = that._getUploadedBytes(jqXHR) || ub + o.chunkSize;
872
+ // Create a progress event if no final progress event
873
+ // with loaded equaling total has been triggered
874
+ // for this chunk:
875
+ if (currentLoaded + o.chunkSize - o._progress.loaded) {
876
+ that._onProgress(
877
+ $.Event('progress', {
878
+ lengthComputable: true,
879
+ loaded: ub - o.uploadedBytes,
880
+ total: ub - o.uploadedBytes
881
+ }),
882
+ o
883
+ );
884
  }
885
+ options.uploadedBytes = o.uploadedBytes = ub;
886
+ o.result = result;
887
+ o.textStatus = textStatus;
888
+ o.jqXHR = jqXHR;
889
+ that._trigger('chunkdone', null, o);
890
+ that._trigger('chunkalways', null, o);
891
+ if (ub < fs) {
892
+ // File upload not yet complete,
893
+ // continue with the next chunk:
894
+ upload();
895
+ } else {
896
+ dfd.resolveWith(o.context, [result, textStatus, jqXHR]);
897
  }
898
+ })
899
+ .fail(function(jqXHR, textStatus, errorThrown) {
900
+ o.jqXHR = jqXHR;
901
+ o.textStatus = textStatus;
902
+ o.errorThrown = errorThrown;
903
+ that._trigger('chunkfail', null, o);
904
+ that._trigger('chunkalways', null, o);
905
+ dfd.rejectWith(o.context, [jqXHR, textStatus, errorThrown]);
906
+ })
907
+ .always(function() {
908
+ that._deinitProgressListener(o);
909
+ });
910
+ };
911
+ this._enhancePromise(promise);
912
+ promise.abort = function() {
913
+ return jqXHR.abort();
914
+ };
915
+ upload();
916
+ return promise;
917
+ },
918
+
919
+ _beforeSend: function(e, data) {
920
+ if (this._active === 0) {
921
+ // the start callback is triggered when an upload starts
922
+ // and no other uploads are currently running,
923
+ // equivalent to the global ajaxStart event:
924
+ this._trigger('start');
925
+ // Set timer for global bitrate progress calculation:
926
+ this._bitrateTimer = new this._BitrateTimer();
927
+ // Reset the global progress values:
928
+ this._progress.loaded = this._progress.total = 0;
929
+ this._progress.bitrate = 0;
930
+ }
931
+ // Make sure the container objects for the .response() and
932
+ // .progress() methods on the data object are available
933
+ // and reset to their initial state:
934
+ this._initResponseObject(data);
935
+ this._initProgressObject(data);
936
+ data._progress.loaded = data.loaded = data.uploadedBytes || 0;
937
+ data._progress.total = data.total = this._getTotal(data.files) || 1;
938
+ data._progress.bitrate = data.bitrate = 0;
939
+ this._active += 1;
940
+ // Initialize the global progress values:
941
+ this._progress.loaded += data.loaded;
942
+ this._progress.total += data.total;
943
+ },
944
+
945
+ _onDone: function(result, textStatus, jqXHR, options) {
946
+ var total = options._progress.total,
947
+ response = options._response;
948
+ if (options._progress.loaded < total) {
949
+ // Create a progress event if no final progress event
950
+ // with loaded equaling total has been triggered:
951
+ this._onProgress(
952
+ $.Event('progress', {
953
+ lengthComputable: true,
954
+ loaded: total,
955
+ total: total
956
+ }),
957
+ options
958
+ );
959
+ }
960
+ response.result = options.result = result;
961
+ response.textStatus = options.textStatus = textStatus;
962
+ response.jqXHR = options.jqXHR = jqXHR;
963
+ this._trigger('done', null, options);
964
+ },
965
+
966
+ _onFail: function(jqXHR, textStatus, errorThrown, options) {
967
+ var response = options._response;
968
+ if (options.recalculateProgress) {
969
+ // Remove the failed (error or abort) file upload from
970
+ // the global progress calculation:
971
+ this._progress.loaded -= options._progress.loaded;
972
+ this._progress.total -= options._progress.total;
973
+ }
974
+ response.jqXHR = options.jqXHR = jqXHR;
975
+ response.textStatus = options.textStatus = textStatus;
976
+ response.errorThrown = options.errorThrown = errorThrown;
977
+ this._trigger('fail', null, options);
978
+ },
979
+
980
+ _onAlways: function(jqXHRorResult, textStatus, jqXHRorError, options) {
981
+ // jqXHRorResult, textStatus and jqXHRorError are added to the
982
+ // options object via done and fail callbacks
983
+ this._trigger('always', null, options);
984
+ },
985
+
986
+ _onSend: function(e, data) {
987
+ if (!data.submit) {
988
+ this._addConvenienceMethods(e, data);
989
+ }
990
+ var that = this,
991
+ jqXHR,
992
+ aborted,
993
+ slot,
994
+ pipe,
995
+ options = that._getAJAXSettings(data),
996
+ send = function() {
997
+ that._sending += 1;
998
+ // Set timer for bitrate progress calculation:
999
+ options._bitrateTimer = new that._BitrateTimer();
1000
+ jqXHR =
1001
+ jqXHR ||
1002
+ (
1003
+ ((aborted ||
1004
+ that._trigger(
1005
+ 'send',
1006
+ $.Event('send', { delegatedEvent: e }),
1007
+ options
1008
+ ) === false) &&
1009
+ that._getXHRPromise(false, options.context, aborted)) ||
1010
+ that._chunkedUpload(options) ||
1011
+ $.ajax(options)
1012
+ )
1013
+ .done(function(result, textStatus, jqXHR) {
1014
+ that._onDone(result, textStatus, jqXHR, options);
1015
+ })
1016
+ .fail(function(jqXHR, textStatus, errorThrown) {
1017
+ that._onFail(jqXHR, textStatus, errorThrown, options);
1018
+ })
1019
+ .always(function(jqXHRorResult, textStatus, jqXHRorError) {
1020
+ that._deinitProgressListener(options);
1021
+ that._onAlways(
1022
+ jqXHRorResult,
1023
+ textStatus,
1024
+ jqXHRorError,
1025
+ options
1026
  );
1027
+ that._sending -= 1;
1028
+ that._active -= 1;
1029
+ if (
1030
+ options.limitConcurrentUploads &&
1031
+ options.limitConcurrentUploads > that._sending
1032
+ ) {
1033
+ // Start the next queued upload,
1034
+ // that has not been aborted:
1035
+ var nextSlot = that._slots.shift();
1036
+ while (nextSlot) {
1037
+ if (that._getDeferredState(nextSlot) === 'pending') {
1038
+ nextSlot.resolve();
1039
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1040
  }
1041
+ nextSlot = that._slots.shift();
1042
+ }
 
 
1043
  }
1044
+ if (that._active === 0) {
1045
+ // The stop callback is triggered when all uploads have
1046
+ // been completed, equivalent to the global ajaxStop event:
1047
+ that._trigger('stop');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1048
  }
1049
+ });
1050
+ return jqXHR;
1051
+ };
1052
+ this._beforeSend(e, options);
1053
+ if (
1054
+ this.options.sequentialUploads ||
1055
+ (this.options.limitConcurrentUploads &&
1056
+ this.options.limitConcurrentUploads <= this._sending)
1057
+ ) {
1058
+ if (this.options.limitConcurrentUploads > 1) {
1059
+ slot = $.Deferred();
1060
+ this._slots.push(slot);
1061
+ pipe = slot.then(send);
1062
+ } else {
1063
+ this._sequence = this._sequence.then(send, send);
1064
+ pipe = this._sequence;
1065
+ }
1066
+ // Return the piped Promise object, enhanced with an abort method,
1067
+ // which is delegated to the jqXHR object of the current upload,
1068
+ // and jqXHR callbacks mapped to the equivalent Promise methods:
1069
+ pipe.abort = function() {
1070
+ aborted = [undefined, 'abort', 'abort'];
1071
+ if (!jqXHR) {
1072
+ if (slot) {
1073
+ slot.rejectWith(options.context, aborted);
1074
  }
1075
+ return send();
1076
+ }
1077
+ return jqXHR.abort();
1078
+ };
1079
+ return this._enhancePromise(pipe);
1080
+ }
1081
+ return send();
1082
+ },
1083
+
1084
+ _onAdd: function(e, data) {
1085
+ var that = this,
1086
+ result = true,
1087
+ options = $.extend({}, this.options, data),
1088
+ files = data.files,
1089
+ filesLength = files.length,
1090
+ limit = options.limitMultiFileUploads,
1091
+ limitSize = options.limitMultiFileUploadSize,
1092
+ overhead = options.limitMultiFileUploadSizeOverhead,
1093
+ batchSize = 0,
1094
+ paramName = this._getParamName(options),
1095
+ paramNameSet,
1096
+ paramNameSlice,
1097
+ fileSet,
1098
+ i,
1099
+ j = 0;
1100
+ if (!filesLength) {
1101
+ return false;
1102
+ }
1103
+ if (limitSize && files[0].size === undefined) {
1104
+ limitSize = undefined;
1105
+ }
1106
+ if (
1107
+ !(options.singleFileUploads || limit || limitSize) ||
1108
+ !this._isXHRUpload(options)
1109
+ ) {
1110
+ fileSet = [files];
1111
+ paramNameSet = [paramName];
1112
+ } else if (!(options.singleFileUploads || limitSize) && limit) {
1113
+ fileSet = [];
1114
+ paramNameSet = [];
1115
+ for (i = 0; i < filesLength; i += limit) {
1116
+ fileSet.push(files.slice(i, i + limit));
1117
+ paramNameSlice = paramName.slice(i, i + limit);
1118
+ if (!paramNameSlice.length) {
1119
+ paramNameSlice = paramName;
1120
+ }
1121
+ paramNameSet.push(paramNameSlice);
1122
+ }
1123
+ } else if (!options.singleFileUploads && limitSize) {
1124
+ fileSet = [];
1125
+ paramNameSet = [];
1126
+ for (i = 0; i < filesLength; i = i + 1) {
1127
+ batchSize += files[i].size + overhead;
1128
+ if (
1129
+ i + 1 === filesLength ||
1130
+ batchSize + files[i + 1].size + overhead > limitSize ||
1131
+ (limit && i + 1 - j >= limit)
1132
+ ) {
1133
+ fileSet.push(files.slice(j, i + 1));
1134
+ paramNameSlice = paramName.slice(j, i + 1);
1135
+ if (!paramNameSlice.length) {
1136
+ paramNameSlice = paramName;
1137
  }
1138
+ paramNameSet.push(paramNameSlice);
1139
+ j = i + 1;
1140
+ batchSize = 0;
1141
+ }
1142
+ }
1143
+ } else {
1144
+ paramNameSet = paramName;
1145
+ }
1146
+ data.originalFiles = files;
1147
+ $.each(fileSet || files, function(index, element) {
1148
+ var newData = $.extend({}, data);
1149
+ newData.files = fileSet ? element : [element];
1150
+ newData.paramName = paramNameSet[index];
1151
+ that._initResponseObject(newData);
1152
+ that._initProgressObject(newData);
1153
+ that._addConvenienceMethods(e, newData);
1154
+ result = that._trigger(
1155
+ 'add',
1156
+ $.Event('add', { delegatedEvent: e }),
1157
+ newData
1158
+ );
1159
+ return result;
1160
+ });
1161
+ return result;
1162
+ },
1163
+
1164
+ _replaceFileInput: function(data) {
1165
+ var input = data.fileInput,
1166
+ inputClone = input.clone(true),
1167
+ restoreFocus = input.is(document.activeElement);
1168
+ // Add a reference for the new cloned file input to the data argument:
1169
+ data.fileInputClone = inputClone;
1170
+ $('<form></form>')
1171
+ .append(inputClone)[0]
1172
+ .reset();
1173
+ // Detaching allows to insert the fileInput on another form
1174
+ // without loosing the file input value:
1175
+ input.after(inputClone).detach();
1176
+ // If the fileInput had focus before it was detached,
1177
+ // restore focus to the inputClone.
1178
+ if (restoreFocus) {
1179
+ inputClone.focus();
1180
+ }
1181
+ // Avoid memory leaks with the detached file input:
1182
+ $.cleanData(input.unbind('remove'));
1183
+ // Replace the original file input element in the fileInput
1184
+ // elements set with the clone, which has been copied including
1185
+ // event handlers:
1186
+ this.options.fileInput = this.options.fileInput.map(function(i, el) {
1187
+ if (el === input[0]) {
1188
+ return inputClone[0];
1189
+ }
1190
+ return el;
1191
+ });
1192
+ // If the widget has been initialized on the file input itself,
1193
+ // override this.element with the file input clone:
1194
+ if (input[0] === this.element[0]) {
1195
+ this.element = inputClone;
1196
+ }
1197
+ },
1198
+
1199
+ _handleFileTreeEntry: function(entry, path) {
1200
+ var that = this,
1201
+ dfd = $.Deferred(),
1202
+ entries = [],
1203
+ dirReader,
1204
+ errorHandler = function(e) {
1205
+ if (e && !e.entry) {
1206
+ e.entry = entry;
1207
+ }
1208
+ // Since $.when returns immediately if one
1209
+ // Deferred is rejected, we use resolve instead.
1210
+ // This allows valid files and invalid items
1211
+ // to be returned together in one set:
1212
+ dfd.resolve([e]);
1213
  },
1214
+ successHandler = function(entries) {
1215
+ that
1216
+ ._handleFileTreeEntries(entries, path + entry.name + '/')
1217
+ .done(function(files) {
1218
+ dfd.resolve(files);
1219
+ })
1220
+ .fail(errorHandler);
 
 
 
 
1221
  },
1222
+ readEntries = function() {
1223
+ dirReader.readEntries(function(results) {
1224
+ if (!results.length) {
1225
+ successHandler(entries);
1226
+ } else {
1227
+ entries = entries.concat(results);
1228
+ readEntries();
 
 
 
 
1229
  }
1230
+ }, errorHandler);
1231
+ };
1232
+ // eslint-disable-next-line no-param-reassign
1233
+ path = path || '';
1234
+ if (entry.isFile) {
1235
+ if (entry._file) {
1236
+ // Workaround for Chrome bug #149735
1237
+ entry._file.relativePath = path;
1238
+ dfd.resolve(entry._file);
1239
+ } else {
1240
+ entry.file(function(file) {
1241
+ file.relativePath = path;
1242
+ dfd.resolve(file);
1243
+ }, errorHandler);
1244
+ }
1245
+ } else if (entry.isDirectory) {
1246
+ dirReader = entry.createReader();
1247
+ readEntries();
1248
+ } else {
1249
+ // Return an empty list for file system items
1250
+ // other than files or directories:
1251
+ dfd.resolve([]);
1252
+ }
1253
+ return dfd.promise();
1254
+ },
1255
+
1256
+ _handleFileTreeEntries: function(entries, path) {
1257
+ var that = this;
1258
+ return $.when
1259
+ .apply(
1260
+ $,
1261
+ $.map(entries, function(entry) {
1262
+ return that._handleFileTreeEntry(entry, path);
1263
+ })
1264
+ )
1265
+ .then(function() {
1266
+ return Array.prototype.concat.apply([], arguments);
1267
+ });
1268
+ },
1269
+
1270
+ _getDroppedFiles: function(dataTransfer) {
1271
+ // eslint-disable-next-line no-param-reassign
1272
+ dataTransfer = dataTransfer || {};
1273
+ var items = dataTransfer.items;
1274
+ if (
1275
+ items &&
1276
+ items.length &&
1277
+ (items[0].webkitGetAsEntry || items[0].getAsEntry)
1278
+ ) {
1279
+ return this._handleFileTreeEntries(
1280
+ $.map(items, function(item) {
1281
+ var entry;
1282
+ if (item.webkitGetAsEntry) {
1283
+ entry = item.webkitGetAsEntry();
1284
+ if (entry) {
1285
+ // Workaround for Chrome bug #149735:
1286
+ entry._file = item.getAsFile();
1287
+ }
1288
+ return entry;
1289
  }
1290
+ return item.getAsEntry();
1291
+ })
1292
+ );
1293
+ }
1294
+ return $.Deferred()
1295
+ .resolve($.makeArray(dataTransfer.files))
1296
+ .promise();
1297
+ },
1298
+
1299
+ _getSingleFileInputFiles: function(fileInput) {
1300
+ // eslint-disable-next-line no-param-reassign
1301
+ fileInput = $(fileInput);
1302
+ var entries =
1303
+ fileInput.prop('webkitEntries') || fileInput.prop('entries'),
1304
+ files,
1305
+ value;
1306
+ if (entries && entries.length) {
1307
+ return this._handleFileTreeEntries(entries);
1308
+ }
1309
+ files = $.makeArray(fileInput.prop('files'));
1310
+ if (!files.length) {
1311
+ value = fileInput.prop('value');
1312
+ if (!value) {
1313
+ return $.Deferred()
1314
+ .resolve([])
1315
+ .promise();
1316
+ }
1317
+ // If the files property is not available, the browser does not
1318
+ // support the File API and we add a pseudo File object with
1319
+ // the input value as name with path information removed:
1320
+ files = [{ name: value.replace(/^.*\\/, '') }];
1321
+ } else if (files[0].name === undefined && files[0].fileName) {
1322
+ // File normalization for Safari 4 and Firefox 3:
1323
+ $.each(files, function(index, file) {
1324
+ file.name = file.fileName;
1325
+ file.size = file.fileSize;
1326
+ });
1327
+ }
1328
+ return $.Deferred()
1329
+ .resolve(files)
1330
+ .promise();
1331
+ },
1332
+
1333
+ _getFileInputFiles: function(fileInput) {
1334
+ if (!(fileInput instanceof $) || fileInput.length === 1) {
1335
+ return this._getSingleFileInputFiles(fileInput);
1336
+ }
1337
+ return $.when
1338
+ .apply($, $.map(fileInput, this._getSingleFileInputFiles))
1339
+ .then(function() {
1340
+ return Array.prototype.concat.apply([], arguments);
1341
+ });
1342
+ },
1343
+
1344
+ _onChange: function(e) {
1345
+ var that = this,
1346
+ data = {
1347
+ fileInput: $(e.target),
1348
+ form: $(e.target.form)
1349
+ };
1350
+ this._getFileInputFiles(data.fileInput).always(function(files) {
1351
+ data.files = files;
1352
+ if (that.options.replaceFileInput) {
1353
+ that._replaceFileInput(data);
1354
+ }
1355
+ if (
1356
+ that._trigger(
1357
+ 'change',
1358
+ $.Event('change', { delegatedEvent: e }),
1359
+ data
1360
+ ) !== false
1361
+ ) {
1362
+ that._onAdd(e, data);
1363
+ }
1364
+ });
1365
+ },
1366
+
1367
+ _onPaste: function(e) {
1368
+ var items =
1369
+ e.originalEvent &&
1370
+ e.originalEvent.clipboardData &&
1371
+ e.originalEvent.clipboardData.items,
1372
+ data = { files: [] };
1373
+ if (items && items.length) {
1374
+ $.each(items, function(index, item) {
1375
+ var file = item.getAsFile && item.getAsFile();
1376
+ if (file) {
1377
+ data.files.push(file);
1378
+ }
1379
+ });
1380
+ if (
1381
+ this._trigger(
1382
+ 'paste',
1383
+ $.Event('paste', { delegatedEvent: e }),
1384
+ data
1385
+ ) !== false
1386
+ ) {
1387
+ this._onAdd(e, data);
1388
+ }
1389
+ }
1390
+ },
1391
+
1392
+ _onDrop: function(e) {
1393
+ e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;
1394
+ var that = this,
1395
+ dataTransfer = e.dataTransfer,
1396
+ data = {};
1397
+ if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {
1398
+ e.preventDefault();
1399
+ this._getDroppedFiles(dataTransfer).always(function(files) {
1400
+ data.files = files;
1401
+ if (
1402
+ that._trigger(
1403
+ 'drop',
1404
+ $.Event('drop', { delegatedEvent: e }),
1405
+ data
1406
+ ) !== false
1407
+ ) {
1408
+ that._onAdd(e, data);
1409
+ }
1410
+ });
1411
+ }
1412
+ },
1413
+
1414
+ _onDragOver: getDragHandler('dragover'),
1415
+
1416
+ _onDragEnter: getDragHandler('dragenter'),
1417
+
1418
+ _onDragLeave: getDragHandler('dragleave'),
1419
+
1420
+ _initEventHandlers: function() {
1421
+ if (this._isXHRUpload(this.options)) {
1422
+ this._on(this.options.dropZone, {
1423
+ dragover: this._onDragOver,
1424
+ drop: this._onDrop,
1425
+ // event.preventDefault() on dragenter is required for IE10+:
1426
+ dragenter: this._onDragEnter,
1427
+ // dragleave is not required, but added for completeness:
1428
+ dragleave: this._onDragLeave
1429
+ });
1430
+ this._on(this.options.pasteZone, {
1431
+ paste: this._onPaste
1432
+ });
1433
+ }
1434
+ if ($.support.fileInput) {
1435
+ this._on(this.options.fileInput, {
1436
+ change: this._onChange
1437
+ });
1438
+ }
1439
+ },
1440
+
1441
+ _destroyEventHandlers: function() {
1442
+ this._off(this.options.dropZone, 'dragenter dragleave dragover drop');
1443
+ this._off(this.options.pasteZone, 'paste');
1444
+ this._off(this.options.fileInput, 'change');
1445
+ },
1446
+
1447
+ _destroy: function() {
1448
+ this._destroyEventHandlers();
1449
+ },
1450
+
1451
+ _setOption: function(key, value) {
1452
+ var reinit = $.inArray(key, this._specialOptions) !== -1;
1453
+ if (reinit) {
1454
+ this._destroyEventHandlers();
1455
+ }
1456
+ this._super(key, value);
1457
+ if (reinit) {
1458
+ this._initSpecialOptions();
1459
+ this._initEventHandlers();
1460
+ }
1461
+ },
1462
+
1463
+ _initSpecialOptions: function() {
1464
+ var options = this.options;
1465
+ if (options.fileInput === undefined) {
1466
+ options.fileInput = this.element.is('input[type="file"]')
1467
+ ? this.element
1468
+ : this.element.find('input[type="file"]');
1469
+ } else if (!(options.fileInput instanceof $)) {
1470
+ options.fileInput = $(options.fileInput);
1471
+ }
1472
+ if (!(options.dropZone instanceof $)) {
1473
+ options.dropZone = $(options.dropZone);
1474
+ }
1475
+ if (!(options.pasteZone instanceof $)) {
1476
+ options.pasteZone = $(options.pasteZone);
1477
+ }
1478
+ },
1479
+
1480
+ _getRegExp: function(str) {
1481
+ var parts = str.split('/'),
1482
+ modifiers = parts.pop();
1483
+ parts.shift();
1484
+ return new RegExp(parts.join('/'), modifiers);
1485
+ },
1486
+
1487
+ _isRegExpOption: function(key, value) {
1488
+ return (
1489
+ key !== 'url' &&
1490
+ $.type(value) === 'string' &&
1491
+ /^\/.*\/[igm]{0,3}$/.test(value)
1492
+ );
1493
+ },
1494
+
1495
+ _initDataAttributes: function() {
1496
+ var that = this,
1497
+ options = this.options,
1498
+ data = this.element.data();
1499
+ // Initialize options set via HTML5 data-attributes:
1500
+ $.each(this.element[0].attributes, function(index, attr) {
1501
+ var key = attr.name.toLowerCase(),
1502
+ value;
1503
+ if (/^data-/.test(key)) {
1504
+ // Convert hyphen-ated key to camelCase:
1505
+ key = key.slice(5).replace(/-[a-z]/g, function(str) {
1506
+ return str.charAt(1).toUpperCase();
1507
+ });
1508
+ value = data[key];
1509
+ if (that._isRegExpOption(key, value)) {
1510
+ value = that._getRegExp(value);
1511
+ }
1512
+ options[key] = value;
1513
+ }
1514
+ });
1515
+ },
1516
+
1517
+ _create: function() {
1518
+ this._initDataAttributes();
1519
+ this._initSpecialOptions();
1520
+ this._slots = [];
1521
+ this._sequence = this._getXHRPromise(true);
1522
+ this._sending = this._active = 0;
1523
+ this._initProgressObject(this);
1524
+ this._initEventHandlers();
1525
+ },
1526
+
1527
+ // This method is exposed to the widget API and allows to query
1528
+ // the number of active uploads:
1529
+ active: function() {
1530
+ return this._active;
1531
+ },
1532
+
1533
+ // This method is exposed to the widget API and allows to query
1534
+ // the widget upload progress.
1535
+ // It returns an object with loaded, total and bitrate properties
1536
+ // for the running uploads:
1537
+ progress: function() {
1538
+ return this._progress;
1539
+ },
1540
+
1541
+ // This method is exposed to the widget API and allows adding files
1542
+ // using the fileupload API. The data parameter accepts an object which
1543
+ // must have a files property and can contain additional options:
1544
+ // .fileupload('add', {files: filesList});
1545
+ add: function(data) {
1546
+ var that = this;
1547
+ if (!data || this.options.disabled) {
1548
+ return;
1549
+ }
1550
+ if (data.fileInput && !data.files) {
1551
+ this._getFileInputFiles(data.fileInput).always(function(files) {
1552
+ data.files = files;
1553
+ that._onAdd(null, data);
1554
+ });
1555
+ } else {
1556
+ data.files = $.makeArray(data.files);
1557
+ this._onAdd(null, data);
1558
+ }
1559
+ },
1560
+
1561
+ // This method is exposed to the widget API and allows sending files
1562
+ // using the fileupload API. The data parameter accepts an object which
1563
+ // must have a files or fileInput property and can contain additional options:
1564
+ // .fileupload('send', {files: filesList});
1565
+ // The method returns a Promise object for the file upload call.
1566
+ send: function(data) {
1567
+ if (data && !this.options.disabled) {
1568
+ if (data.fileInput && !data.files) {
1569
+ var that = this,
1570
+ dfd = $.Deferred(),
1571
+ promise = dfd.promise(),
1572
+ jqXHR,
1573
+ aborted;
1574
+ promise.abort = function() {
1575
+ aborted = true;
1576
+ if (jqXHR) {
1577
+ return jqXHR.abort();
1578
  }
1579
+ dfd.reject(null, 'abort', 'abort');
1580
+ return promise;
1581
+ };
1582
+ this._getFileInputFiles(data.fileInput).always(function(files) {
1583
+ if (aborted) {
1584
+ return;
 
 
1585
  }
1586
+ if (!files.length) {
1587
+ dfd.reject();
1588
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1589
  }
1590
+ data.files = files;
1591
+ jqXHR = that._onSend(null, data);
1592
+ jqXHR.then(
1593
+ function(result, textStatus, jqXHR) {
1594
+ dfd.resolve(result, textStatus, jqXHR);
1595
+ },
1596
+ function(jqXHR, textStatus, errorThrown) {
1597
+ dfd.reject(jqXHR, textStatus, errorThrown);
1598
+ }
1599
+ );
1600
+ });
1601
+ return this._enhancePromise(promise);
1602
  }
1603
+ data.files = $.makeArray(data.files);
1604
+ if (data.files.length) {
1605
+ return this._onSend(null, data);
1606
+ }
1607
+ }
1608
+ return this._getXHRPromise(false, data && data.context);
1609
+ }
1610
+ });
1611
+ });
filemanager/js/jq_uploader/jquery.iframe-transport.js CHANGED
@@ -1,185 +1,221 @@
1
  /*
2
- * jQuery Iframe Transport Plugin 1.6.1
3
  * https://github.com/blueimp/jQuery-File-Upload
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 unparam: true, nomen: true */
13
- /*global define, 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(['jquery'], factory);
20
- } else {
21
- // Browser globals:
22
- factory(window.jQuery);
23
- }
24
- }(function ($) {
25
- 'use strict';
 
 
 
26
 
27
- // Helper variable to create unique names for the transport iframes:
28
- var counter = 0;
 
 
29
 
30
- // The iframe transport accepts three additional options:
31
- // options.fileInput: a jQuery collection of file input fields
32
- // options.paramName: the parameter name for the file form data,
33
- // overrides the name property of the file input field(s),
34
- // can be a string or an array of strings.
35
- // options.formData: an array of objects with name and value properties,
36
- // equivalent to the return data of .serializeArray(), e.g.:
37
- // [{name: 'a', value: 1}, {name: 'b', value: 2}]
38
- $.ajaxTransport('iframe', function (options) {
39
- if (options.async) {
40
- var form,
41
- iframe,
42
- addParamChar;
43
- return {
44
- send: function (_, completeCallback) {
45
- form = $('<form style="display:none;"></form>');
46
- form.attr('accept-charset', options.formAcceptCharset);
47
- addParamChar = /\?/.test(options.url) ? '&' : '?';
48
- // XDomainRequest only supports GET and POST:
49
- if (options.type === 'DELETE') {
50
- options.url = options.url + addParamChar + '_method=DELETE';
51
- options.type = 'POST';
52
- } else if (options.type === 'PUT') {
53
- options.url = options.url + addParamChar + '_method=PUT';
54
- options.type = 'POST';
55
- } else if (options.type === 'PATCH') {
56
- options.url = options.url + addParamChar + '_method=PATCH';
57
- options.type = 'POST';
58
- }
59
- // javascript:false as initial iframe src
60
- // prevents warning popups on HTTPS in IE6.
61
- // IE versions below IE8 cannot set the name property of
62
- // elements that have already been added to the DOM,
63
- // so we set the name along with the iframe HTML markup:
64
- iframe = $(
65
- '<iframe src="javascript:false;" name="iframe-transport-' +
66
- (counter += 1) + '"></iframe>'
67
- ).bind('load', function () {
68
- var fileInputClones,
69
- paramNames = $.isArray(options.paramName) ?
70
- options.paramName : [options.paramName];
71
- iframe
72
- .unbind('load')
73
- .bind('load', function () {
74
- var response;
75
- // Wrap in a try/catch block to catch exceptions thrown
76
- // when trying to access cross-domain iframe contents:
77
- try {
78
- response = iframe.contents();
79
- // Google Chrome and Firefox do not throw an
80
- // exception when calling iframe.contents() on
81
- // cross-domain requests, so we unify the response:
82
- if (!response.length || !response[0].firstChild) {
83
- throw new Error();
84
- }
85
- } catch (e) {
86
- response = undefined;
87
- }
88
- // The complete callback returns the
89
- // iframe content document as response object:
90
- completeCallback(
91
- 200,
92
- 'success',
93
- {'iframe': response}
94
- );
95
- // Fix for IE endless progress bar activity bug
96
- // (happens on form submits to iframe targets):
97
- $('<iframe src="javascript:false;"></iframe>')
98
- .appendTo(form);
99
- form.remove();
100
- });
101
- form
102
- .prop('target', iframe.prop('name'))
103
- .prop('action', options.url)
104
- .prop('method', options.type);
105
- if (options.formData) {
106
- $.each(options.formData, function (index, field) {
107
- $('<input type="hidden"/>')
108
- .prop('name', field.name)
109
- .val(field.value)
110
- .appendTo(form);
111
- });
112
- }
113
- if (options.fileInput && options.fileInput.length &&
114
- options.type === 'POST') {
115
- fileInputClones = options.fileInput.clone();
116
- // Insert a clone for each file input field:
117
- options.fileInput.after(function (index) {
118
- return fileInputClones[index];
119
- });
120
- if (options.paramName) {
121
- options.fileInput.each(function (index) {
122
- $(this).prop(
123
- 'name',
124
- paramNames[index] || options.paramName
125
- );
126
- });
127
- }
128
- // Appending the file input fields to the hidden form
129
- // removes them from their original location:
130
- form
131
- .append(options.fileInput)
132
- .prop('enctype', 'multipart/form-data')
133
- // enctype must be set as encoding for IE:
134
- .prop('encoding', 'multipart/form-data');
135
- }
136
- form.submit();
137
- // Insert the file input fields at their original location
138
- // by replacing the clones with the originals:
139
- if (fileInputClones && fileInputClones.length) {
140
- options.fileInput.each(function (index, input) {
141
- var clone = $(fileInputClones[index]);
142
- $(input).prop('name', clone.prop('name'));
143
- clone.replaceWith(input);
144
- });
145
- }
146
- });
147
- form.append(iframe).appendTo(document.body);
148
- },
149
- abort: function () {
150
- if (iframe) {
151
- // javascript:false as iframe src aborts the request
152
- // and prevents warning popups on HTTPS in IE6.
153
- // concat is used to avoid the "Script URL" JSLint error:
154
- iframe
155
- .unbind('load')
156
- .prop('src', 'javascript'.concat(':false;'));
157
- }
158
- if (form) {
159
- form.remove();
160
- }
161
- }
162
- };
163
- }
164
- });
165
 
166
- // The iframe transport returns the iframe content document as response.
167
- // The following adds converters from iframe to text, json, html, and script:
168
- $.ajaxSetup({
169
- converters: {
170
- 'iframe text': function (iframe) {
171
- return iframe && $(iframe[0].body).text();
172
- },
173
- 'iframe json': function (iframe) {
174
- return iframe && $.parseJSON($(iframe[0].body).text());
175
- },
176
- 'iframe html': function (iframe) {
177
- return iframe && $(iframe[0].body).html();
178
- },
179
- 'iframe script': function (iframe) {
180
- return iframe && $.globalEval($(iframe[0].body).text());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  }
183
- });
 
 
184
 
185
- }));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*
2
+ * jQuery Iframe Transport Plugin
3
  * https://github.com/blueimp/jQuery-File-Upload
4
  *
5
  * Copyright 2011, Sebastian Tschan
6
  * https://blueimp.net
7
  *
8
  * Licensed under the MIT license:
9
+ * https://opensource.org/licenses/MIT
10
  */
11
 
12
+ /* global define, require */
 
13
 
14
+ (function(factory) {
15
+ 'use strict';
16
+ if (typeof define === 'function' && define.amd) {
17
+ // Register as an anonymous AMD module:
18
+ define(['jquery'], factory);
19
+ } else if (typeof exports === 'object') {
20
+ // Node/CommonJS:
21
+ factory(require('jquery'));
22
+ } else {
23
+ // Browser globals:
24
+ factory(window.jQuery);
25
+ }
26
+ })(function($) {
27
+ 'use strict';
28
 
29
+ // Helper variable to create unique names for the transport iframes:
30
+ var counter = 0,
31
+ jsonAPI = $,
32
+ jsonParse = 'parseJSON';
33
 
34
+ if ('JSON' in window && 'parse' in JSON) {
35
+ jsonAPI = JSON;
36
+ jsonParse = 'parse';
37
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
+ // The iframe transport accepts four additional options:
40
+ // options.fileInput: a jQuery collection of file input fields
41
+ // options.paramName: the parameter name for the file form data,
42
+ // overrides the name property of the file input field(s),
43
+ // can be a string or an array of strings.
44
+ // options.formData: an array of objects with name and value properties,
45
+ // equivalent to the return data of .serializeArray(), e.g.:
46
+ // [{name: 'a', value: 1}, {name: 'b', value: 2}]
47
+ // options.initialIframeSrc: the URL of the initial iframe src,
48
+ // by default set to "javascript:false;"
49
+ $.ajaxTransport('iframe', function(options) {
50
+ if (options.async) {
51
+ // javascript:false as initial iframe src
52
+ // prevents warning popups on HTTPS in IE6:
53
+ // eslint-disable-next-line no-script-url
54
+ var initialIframeSrc = options.initialIframeSrc || 'javascript:false;',
55
+ form,
56
+ iframe,
57
+ addParamChar;
58
+ return {
59
+ send: function(_, completeCallback) {
60
+ form = $('<form style="display:none;"></form>');
61
+ form.attr('accept-charset', options.formAcceptCharset);
62
+ addParamChar = /\?/.test(options.url) ? '&' : '?';
63
+ // XDomainRequest only supports GET and POST:
64
+ if (options.type === 'DELETE') {
65
+ options.url = options.url + addParamChar + '_method=DELETE';
66
+ options.type = 'POST';
67
+ } else if (options.type === 'PUT') {
68
+ options.url = options.url + addParamChar + '_method=PUT';
69
+ options.type = 'POST';
70
+ } else if (options.type === 'PATCH') {
71
+ options.url = options.url + addParamChar + '_method=PATCH';
72
+ options.type = 'POST';
73
+ }
74
+ // IE versions below IE8 cannot set the name property of
75
+ // elements that have already been added to the DOM,
76
+ // so we set the name along with the iframe HTML markup:
77
+ counter += 1;
78
+ iframe = $(
79
+ '<iframe src="' +
80
+ initialIframeSrc +
81
+ '" name="iframe-transport-' +
82
+ counter +
83
+ '"></iframe>'
84
+ ).bind('load', function() {
85
+ var fileInputClones,
86
+ paramNames = $.isArray(options.paramName)
87
+ ? options.paramName
88
+ : [options.paramName];
89
+ iframe.unbind('load').bind('load', function() {
90
+ var response;
91
+ // Wrap in a try/catch block to catch exceptions thrown
92
+ // when trying to access cross-domain iframe contents:
93
+ try {
94
+ response = iframe.contents();
95
+ // Google Chrome and Firefox do not throw an
96
+ // exception when calling iframe.contents() on
97
+ // cross-domain requests, so we unify the response:
98
+ if (!response.length || !response[0].firstChild) {
99
+ throw new Error();
100
+ }
101
+ } catch (e) {
102
+ response = undefined;
103
+ }
104
+ // The complete callback returns the
105
+ // iframe content document as response object:
106
+ completeCallback(200, 'success', { iframe: response });
107
+ // Fix for IE endless progress bar activity bug
108
+ // (happens on form submits to iframe targets):
109
+ $('<iframe src="' + initialIframeSrc + '"></iframe>').appendTo(
110
+ form
111
+ );
112
+ window.setTimeout(function() {
113
+ // Removing the form in a setTimeout call
114
+ // allows Chrome's developer tools to display
115
+ // the response result
116
+ form.remove();
117
+ }, 0);
118
+ });
119
+ form
120
+ .prop('target', iframe.prop('name'))
121
+ .prop('action', options.url)
122
+ .prop('method', options.type);
123
+ if (options.formData) {
124
+ $.each(options.formData, function(index, field) {
125
+ $('<input type="hidden"/>')
126
+ .prop('name', field.name)
127
+ .val(field.value)
128
+ .appendTo(form);
129
+ });
130
  }
131
+ if (
132
+ options.fileInput &&
133
+ options.fileInput.length &&
134
+ options.type === 'POST'
135
+ ) {
136
+ fileInputClones = options.fileInput.clone();
137
+ // Insert a clone for each file input field:
138
+ options.fileInput.after(function(index) {
139
+ return fileInputClones[index];
140
+ });
141
+ if (options.paramName) {
142
+ options.fileInput.each(function(index) {
143
+ $(this).prop('name', paramNames[index] || options.paramName);
144
+ });
145
+ }
146
+ // Appending the file input fields to the hidden form
147
+ // removes them from their original location:
148
+ form
149
+ .append(options.fileInput)
150
+ .prop('enctype', 'multipart/form-data')
151
+ // enctype must be set as encoding for IE:
152
+ .prop('encoding', 'multipart/form-data');
153
+ // Remove the HTML5 form attribute from the input(s):
154
+ options.fileInput.removeAttr('form');
155
+ }
156
+ form.submit();
157
+ // Insert the file input fields at their original location
158
+ // by replacing the clones with the originals:
159
+ if (fileInputClones && fileInputClones.length) {
160
+ options.fileInput.each(function(index, input) {
161
+ var clone = $(fileInputClones[index]);
162
+ // Restore the original name and form properties:
163
+ $(input)
164
+ .prop('name', clone.prop('name'))
165
+ .attr('form', clone.attr('form'));
166
+ clone.replaceWith(input);
167
+ });
168
+ }
169
+ });
170
+ form.append(iframe).appendTo(document.body);
171
+ },
172
+ abort: function() {
173
+ if (iframe) {
174
+ // javascript:false as iframe src aborts the request
175
+ // and prevents warning popups on HTTPS in IE6.
176
+ iframe.unbind('load').prop('src', initialIframeSrc);
177
+ }
178
+ if (form) {
179
+ form.remove();
180
+ }
181
  }
182
+ };
183
+ }
184
+ });
185
 
186
+ // The iframe transport returns the iframe content document as response.
187
+ // The following adds converters from iframe to text, json, html, xml
188
+ // and script.
189
+ // Please note that the Content-Type for JSON responses has to be text/plain
190
+ // or text/html, if the browser doesn't include application/json in the
191
+ // Accept header, else IE will show a download dialog.
192
+ // The Content-Type for XML responses on the other hand has to be always
193
+ // application/xml or text/xml, so IE properly parses the XML response.
194
+ // See also
195
+ // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation
196
+ $.ajaxSetup({
197
+ converters: {
198
+ 'iframe text': function(iframe) {
199
+ return iframe && $(iframe[0].body).text();
200
+ },
201
+ 'iframe json': function(iframe) {
202
+ return iframe && jsonAPI[jsonParse]($(iframe[0].body).text());
203
+ },
204
+ 'iframe html': function(iframe) {
205
+ return iframe && $(iframe[0].body).html();
206
+ },
207
+ 'iframe xml': function(iframe) {
208
+ var xmlDoc = iframe && iframe[0];
209
+ return xmlDoc && $.isXMLDoc(xmlDoc)
210
+ ? xmlDoc
211
+ : $.parseXML(
212
+ (xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) ||
213
+ $(xmlDoc.body).html()
214
+ );
215
+ },
216
+ 'iframe script': function(iframe) {
217
+ return iframe && $.globalEval($(iframe[0].body).text());
218
+ }
219
+ }
220
+ });
221
+ });
filemanager/js/jq_uploader/jquery.upload-1.0.2.js DELETED
@@ -1,133 +0,0 @@
1
- /*
2
- * jQuery.upload v1.0.2
3
- *
4
- * Copyright (c) 2010 lagos
5
- * Dual licensed under the MIT and GPL licenses.
6
- *
7
- * http://lagoscript.org
8
- */
9
- (function($) {
10
-
11
- var uuid = 0;
12
-
13
- $.fn.upload = function(url, data, callback, type) {
14
- var self = this, inputs, checkbox, checked,
15
- iframeName = 'jquery_upload' + ++uuid,
16
- iframe = $('<iframe name="' + iframeName + '" style="position:absolute;top:-9999px" />').appendTo('body'),
17
- form = '<form target="' + iframeName + '" method="post" enctype="multipart/form-data" />';
18
-
19
- if ($.isFunction(data)) {
20
- type = callback;
21
- callback = data;
22
- data = {};
23
- }
24
-
25
- checkbox = $('input:checkbox', this);
26
- checked = $('input:checked', this);
27
- form = self.wrapAll(form).parent('form').attr('action', url);
28
-
29
- // Make sure radios and checkboxes keep original values
30
- // (IE resets checkd attributes when appending)
31
- checkbox.removeAttr('checked');
32
- checked.attr('checked', true);
33
-
34
- inputs = createInputs(data);
35
- inputs = inputs ? $(inputs).appendTo(form) : null;
36
-
37
- form.submit(function() {
38
- iframe.load(function() {
39
- var data = handleData(this, type),
40
- checked = $('input:checked', self);
41
-
42
- form.after(self).remove();
43
- checkbox.removeAttr('checked');
44
- checked.attr('checked', true);
45
- if (inputs) {
46
- inputs.remove();
47
- }
48
-
49
- setTimeout(function() {
50
- iframe.remove();
51
- if (type === 'script') {
52
- $.globalEval(data);
53
- }
54
- if (callback) {
55
- callback.call(self, data);
56
- }
57
- }, 0);
58
- });
59
- }).submit();
60
-
61
- return this;
62
- };
63
-
64
- function createInputs(data) {
65
- return $.map(param(data), function(param) {
66
- return '<input type="hidden" name="' + param.name + '" value="' + param.value + '"/>';
67
- }).join('');
68
- }
69
-
70
- function param(data) {
71
- if ($.isArray(data)) {
72
- return data;
73
- }
74
- var params = [];
75
-
76
- function add(name, value) {
77
- params.push({name:name, value:value});
78
- }
79
-
80
- if (typeof data === 'object') {
81
- $.each(data, function(name) {
82
- if ($.isArray(this)) {
83
- $.each(this, function() {
84
- add(name, this);
85
- });
86
- } else {
87
- add(name, $.isFunction(this) ? this() : this);
88
- }
89
- });
90
- } else if (typeof data === 'string') {
91
- $.each(data.split('&'), function() {
92
- var param = $.map(this.split('='), function(v) {
93
- return decodeURIComponent(v.replace(/\+/g, ' '));
94
- });
95
-
96
- add(param[0], param[1]);
97
- });
98
- }
99
-
100
- return params;
101
- }
102
-
103
- function handleData(iframe, type) {
104
- var data, contents = $(iframe).contents().get(0);
105
-
106
- if ($.isXMLDoc(contents) || contents.XMLDocument) {
107
- return contents.XMLDocument || contents;
108
- }
109
- data = $(contents).find('body').html();
110
-
111
- switch (type) {
112
- case 'xml':
113
- data = parseXml(data);
114
- break;
115
- case 'json':
116
- data = window.eval('(' + data + ')');
117
- break;
118
- }
119
- return data;
120
- }
121
-
122
- function parseXml(text) {
123
- if (window.DOMParser) {
124
- return new DOMParser().parseFromString(text, 'application/xml');
125
- } else {
126
- var xml = new ActiveXObject('Microsoft.XMLDOM');
127
- xml.async = false;
128
- xml.loadXML(text);
129
- return xml;
130
- }
131
- }
132
-
133
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
filemanager/view.php CHANGED
@@ -53,8 +53,8 @@ class FilemanagerView {
53
  wp_print_scripts('jquery');
54
  wp_print_scripts('jquery-ui-widget');
55
  ?>
56
- <script src="<?php echo WDS()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js"></script>
57
- <script src="<?php echo WDS()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.fileupload.js"></script>
58
  <script>
59
  var ajaxurl = "<?php echo wp_nonce_url( admin_url('admin-ajax.php'), 'addImage', 'nonce_wd' ); ?>";
60
  var DS = "<?php echo addslashes('/'); ?>";
53
  wp_print_scripts('jquery');
54
  wp_print_scripts('jquery-ui-widget');
55
  ?>
56
+ <script src="<?php echo WDS()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.iframe-transport.js?v=10.0.0"></script>
57
+ <script src="<?php echo WDS()->plugin_url; ?>/filemanager/js/jq_uploader/jquery.fileupload.js?v=10.0.0"></script>
58
  <script>
59
  var ajaxurl = "<?php echo wp_nonce_url( admin_url('admin-ajax.php'), 'addImage', 'nonce_wd' ); ?>";
60
  var DS = "<?php echo addslashes('/'); ?>";
readme.txt CHANGED
@@ -1,1103 +1,1107 @@
1
- === Slider by 10Web - Responsive Image Slider ===
2
- Contributors: webdorado,10web
3
- Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gallery slider, images slider, Photo Slider, post slider, slider plugin
4
- Requires at least: 3.4
5
- Tested up to: 5.2
6
- Requires PHP: 5.2
7
- Stable tag: 1.2.26
8
- License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
-
11
- Slider by 10Web plugin is the perfect slider solution for Wordpress. Create a great responsive slideshow with Slider by 10Web.
12
-
13
- == Description ==
14
-
15
-
16
- https://www.youtube.com/watch?v=xebpM_-GwG0&index=1&list=PLnxWPiY5tLFWQf5XaEYYPZj0gdggUrVxP
17
-
18
- = Useful Links: =
19
- [Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
20
- [WordPress Slider Plugin](https://10web.io/plugins/wordpress-slider/)
21
- [Demo](https://demo.10web.io/slider/)
22
- [User Manual](https://docs.10web.io/docs/slider-wd/indroduction.html)
23
- [Support Forum](https://wordpress.org/support/plugin/slider-wd)
24
-
25
-
26
- Slider by 10Web is a versatile solution to help you add fast loading, responsive and SEO-friendly sliders to your website pages, posts, theme header or any other location. The plugin supports both images and videos on the slides, which further could be spiced up with various transition effects. Filmstrip, carousel and parallax effects of Premium version will have your slides look even better. You can create multi-functional sliders in Premium version, by applying text, image, video, hotspot and social media button layers to the slides. Every feature of the slides, from text size, navigation buttons to slide loading icon, can be customized, giving you a myriad of options to experiment with style and design. It’s by far the easiest solution to create beautiful sliders, which you can add to your website with a shortcode, by inserting into the theme using the PHP function or through widget. Slider by 10Web supports swipe control to make sure your slides look great on touchscreen devices. If you’re looking for power-packed slider plugin which is also user-friendly, go ahead, download it and test the plugin yourself.
27
-
28
- == Benefits ==
29
- * **User engagement** - Sliders are engaging. Once you add beautiful slides to your posts or pages with some high quality images and appealing styling, you may observe improved user engagement rates.
30
- * **Better user experience** - With its swipe control support Slider by 10Web will provide better user experience on your website. No matter the device or the screen size you can make sure your slides will perform as they should.
31
- * **Differentiation** - From simple text color and fonts, to hotspot animation and effect duration, there are almost unlimited styling options you can try. Factor in support for custom CSS and you will have more space and flexibility with the styling of your sliders.
32
- * **High level of personalization** - One of the best things about Slider by 10Web is its flexibility! You can adjust and customize every aspect of your slides.You can play with all the features of the slides and have them match with your website’s design and overall look and feel.
33
- * **Grabbing users’ attention** - Since the sliders can be basically placed anywhere on your website, it’s a great way to bring attention to any information you want to highlight. Whether it’s an announcement, new post, or just one of your recent video tutorials, you can make sure it will catch the eye.
34
- * **Easy to set up, use and customize** - Plugin was developed with users in mind. Anyone from beginners to WordPress profs will be able to easily create and customize the sliders without any coding skills.
35
- * **Get Support** - Ger timely and effective support to all its users. We keep standards high and response time low.
36
-
37
-
38
- == What’s in it ==
39
-
40
- = UNLIMITED SLIDES AND SLIDERS =
41
-
42
- Slider by 10Web allows you to add unlimited number of sliders to your website with as many slides as you want. Easily insert the sliders to any of your posts or pages with the generated shortcode.
43
-
44
-
45
- = MULTIPLE LAYERS =
46
-
47
- The Premium version allows for creation of multi-functional sliders using the available image, text, video , social media and hotspot layers. Apart from uploading video files from your pc, you can also embed media from YouTube, Vimeo, Instagram, Flickr or Dailymotion using the file’s URL.
48
-
49
-
50
- = MULTIPLE TRANSITION AND LAYER EFFECTS =
51
-
52
- Slider by 10Web Premium version offers 27 slide transition and 38 mind-blowing layer effects to give your slides a distinct look. You can specify the start/end point of the effects, as well as specify the effect duration.
53
-
54
-
55
- = IMAGE WATERMARKING =
56
-
57
- Add text and image watermarks to your slides, by selecting the size, transparency, and one of the available nine watermark positions.
58
-
59
- = SOCIAL SHARING BUTTONS =
60
-
61
- Add a social sharing buttons’ layer to your slides in Premium version. You can customize almost every aspect of the buttons and enable your visitors to share your slides across the major social media platforms, like Facebook, Google +, Twitter, Pinterest and Tumbler.
62
-
63
- = PARALLAX AND CAROUSEL SUPPORT =
64
-
65
- Premium version adds Parallax and carousel support. You can set to display the slides in carousel view, which shows the main image at the foreground, while having the rest of the images at the background. The parallax effect will create modern 3D-like effects on the slides and take them to the next level.
66
-
67
- = SLIDER EXPORT/IMPORT =
68
-
69
- If you want to export/import your slides from one website to another, that’s absolutely doable with Slider by 10Web Premium version. You can choose to transfer the slider with pictures and settings, or you can transfer only the settings of the slider and then add your images afterwards.
70
-
71
- = SETTINGS/CUSTOMIZATION =
72
- *Some customizations described here are available in Premium version. Please refer to feature summary for additional info.
73
-
74
- Slider by 10Web has an intuitive drag and drop interface, which makes it easy to create, organize and customize your slides. All the slider options as well as the plugin overview is available at the admin panel. This is basically where you can create the sliders and make the necessary changes as you go. Under the plugin’s global options, you’ll find the default options for layers and some other general settings, such as enabling Slider by 10Web media upload, choosing the loading icon,adding font families, etc. All the other options for customizing the slides can be found under the sliders section, the place where you can actually start adding new slides. The user friendly interface lets you easily add images and videos to the slides, as well as embed media from popular social platforms. Beneath the added slides you’ll find the available layers that you can apply to them, each of the layers coming with its own set of settings. Before you save the final version of the slide you can preview all the changes you’ve made. At the top of the page,you’ll also find a settings icon,where you can configure the settings for the slider you’re working on. From this section you can activate carousel view, give custom styling to bullets and buttons, adjust settings for filmstrip view, as well as configure the settings for watermarking. Also, you can add custom CSS to the slides for the additional styling features.
75
-
76
-
77
- [Premium version adds](https://10web.io/plugins/wordpress-slider/)
78
-
79
- * 27 Transition effects for slider
80
- * 38 Layer effects
81
- * Support for posts in the slides
82
- * Video Slide support (YouTube slider and Vimeo slider)
83
- * Dailymotion, Instagram and Flickr embed
84
- * Layers (text, image and media embed)- Video Manual
85
- * Social sharing buttons layer (Google+, Tumblr, Twitter, Pinterest and Facebook)
86
- * Hotspot layer
87
- * Filmstrip support
88
- * Custom styles for navigation buttons/bullets
89
- * Support for Parallax Slider
90
- * Support for Carousel effect
91
- * Video Slide and layer (mp4)
92
- * Slider Export/Import.
93
-
94
-
95
- ###IMPORTANT:
96
- If you think you found a bug in Slider by 10Web or have any problem/question concerning the plugin, please check out [WordPress Slider Support Forum](https://wordpress.org/support/plugin/slider-wd) in our website. If you do not find a solution here, do not hesitate to [click here to contact us](https://10web.io/contact-us/).
97
-
98
-
99
- == Installation ==
100
-
101
- #### Thank you for your interest in Slider by 10Web.
102
-
103
- **Installing via WordPress**
104
- Follow the steps below to install Slider by 10Web to your website.
105
- Log-in to your WordPress administrator panel.
106
- Select Plugins page from toolbar menu, click Add New.
107
- Search for Slider by 10Web in the right-top search bar if you want to download the Free version or click Upload Plugin button > “Choose file” (“Browse”) and select the Slider by 10Web zip file if you are installing the Professional version of Slider by 10Web.
108
-
109
- For Mac Users
110
- Go to your Downloads folder and locate the folder with the Slider by 10Web. Right-click on the folder and select Compress. This will create a .zip file which can be installed as described below:
111
- Click “Upload & Install” button.
112
- Click “Activate Plugin” button for activating the plugin.
113
-
114
- **Installing via FTP**
115
-
116
- Login to your hosting space via an FTP software, e.g. FileZilla.
117
- Unzip the downloaded Slider by 10Web plugin folder without making any changes to the folder.
118
- Upload the Slider by 10Web plugin into the following location wp-content>wp-plugins.
119
- Login to the WordPress Administrator Panel.
120
- Activate Slider by 10Web by going to Plugins and pressing Activate button.
121
-
122
- If any problem occurs with installation of Slider by 10Web, [please let us know](https://10web.io/contact-us/).
123
-
124
- == Frequently Asked Questions ==
125
-
126
- = What can I achieve with Slider by 10Web plugin? =
127
-
128
- WordPress Slider plugin is a user-friendly tool which helps you create unlimited responsive sliders for your website.
129
-
130
- It lets you add images, videos, posts and other media as slides or layers. Configure the numerous useful options and showcase your slider on a WordPress **page, post, widget area** or a **custom PHP** template.
131
-
132
- Include **YouTube, Vimeo,** as well as **self-hosted** videos to your slideshow with just a few clicks. Video autoplay feature of Slider plugin lets you provide a modern user interface for the visitors of your website.
133
-
134
- Enrich the display of your slides with **6 amazing layer features,** such as text, image and video layers, other media, social buttons, and hotspots. WordPress Slider plugin provides various aesthetic **transition effects** for slides and layers, letting you advance your slideshow to a whole new level.
135
-
136
- Using this WordPress Slider plugin, you can turn your slideshow into **a posts slider** using your website posts. Furthermore, you can create an interactive slideshow by linking any slide to an internal or external web page.
137
-
138
- Powered by modern technology, WordPress Slider plugin will help you build amazing sliders without having to code a single line. You can create the following types of CSS3 slider with wonderful autoplay feature:
139
-
140
- * cycle slider,
141
- * free video slideshow (specifically TouTube slideshow and vimeo slideshow),
142
- * product carousel,
143
- * Javascript slideshow,
144
- * photo slideshow,
145
- * testimonial slider,
146
- * content slideshow,
147
- * simple image rotator,
148
- * video gallery and more.
149
-
150
- You can display images slider with different elegant animations. This slideshow plugin allows you to display your portfolio images, videos in a modern slider gallery.
151
-
152
- The options to create these slideshows are infinite. For instance, if you wish to create a simple PDF slider, you can use text layers and image layers on a white background image, and thus showcase your content slider in a PDF-like style.
153
-
154
- Or, you can turn the slider into a Woocommerce slider by adding links to Woocommerce product pages.
155
-
156
- = How can I add images to slider? =
157
-
158
- Press **Add Slides** button below **Slider Title** to add an item to your banner rotator. You will access **WordPress Media Library,** which lets you use existing images or upload new media.
159
-
160
- Upload the images and videos you wish to add or browse items from WordPress Media Library. You can select a single item by clicking on it, or choose multiple by pressing and holding **Shift** or **Control** keys on your keyboard.
161
-
162
- After choosing the images and videos for your image carousel or cycle slider, press **Add to Slider** button.
163
-
164
- When the slides are added, you will be able to see the list of their thumbnails which help you to easily navigate through slides. Each thumbnail has its own set of buttons, which will become visible after hovering on an item:
165
-
166
- * **Edit.** You can change the slide image, keeping its attributes (e.g. layers on slides, transitions).
167
- * **Copy.** Pressing this button will create a duplicate of the current slide. The duplicate will be added as the last slide of your slideshow.
168
- * **Delete.** You can delete the slide using this button.
169
-
170
- Furthermore, you are able to change the ordering of the slides by dragging the thumbnails and repositioning them.
171
-
172
- Make sure to **Publish/Update** your slideshow to keep the changes you made. You can also **Preview** the slider to check its appearance.
173
-
174
- **Adding Images from URL**
175
-
176
- In addition to uploading, embedding items and using WordPress posts, WordPress Slider plugin allows to insert images using their absolute links. To do this, press **Add Slides** button and navigate to **Insert from URL** tab.
177
-
178
- This section of the toolbox provides an input, where you just need to add the absolute URL of an image. The link needs to have the following structure:
179
-
180
- *https://example.com/complete-file-path/image.jpg*
181
-
182
- After providing the URL of the slide image, click **Add to Slider** button.
183
-
184
- **Using WD Media Uploader**
185
-
186
- Besides using default Media Library, WordPress Slider plugin has an advanced WD Uploader for adding or editing slides. This is a powerful and user-friendly tool which allows you to upload and manage images, separate them into folders, and more.
187
-
188
- To access WD Uploader, firstly, you need to enable it from **Global Options** of Slider by 10Web plugin. Go to **Slider by 10Web > Options** page and set **Enable WD Media Uploader** setting to **Yes.**
189
-
190
- Afterwards, edit your slideshow and click on **Add Slides** button. Navigate to WD Media Uploader tab to start adding new images. This dashboard includes a set of options which we will describe one by one.
191
-
192
- = Can I add video slides to slider? =
193
-
194
- Slider by 10Web plugin also lets you embed media from various platforms, such as **YouTube** and **Vimeo.** To use this feature, press **Add Slides** button then click on **Embed Media** tab. Use the input bar above to add the **URL** of the image or video you wish to add, then press **Add to slider** button.
195
-
196
- You can import items from the following websites:
197
- * YouTube,
198
- * Vimeo,
199
- * Instagram,
200
- * Flickr,
201
- * Dailymotion.
202
-
203
- For instance, when adding a YouTube video as a slideshow item, you just need to provide its link.
204
-
205
- This lets you create a modern-looking fullscreen slider with videos, that showcase your products, business or services.
206
-
207
- = Is it possible to make custom style changes to a slide? =
208
-
209
- Use **CSS** tab of **Slider Settings** to write additional CSS code and apply custom styles to the slider. Note, that these changes will override the original styles of the slider.
210
-
211
- Also, you can edit its **Settings** by enabling different attributes and configuring corresponding features. For instance, you can enable slide vertical animation effect and turn your slideshow into a vertical slider.
212
-
213
- These vertical slides look especially nice, when you are displaying professional photographs. However, you are able to use all slide effects both on images and videos.
214
-
215
- = Can I publish slider as a widget? =
216
-
217
- To publish your slideshow on a widget area, navigate to Appearance > Widgets page. All widgets on your website and widget areas provided by your theme are available on this dashboard.
218
-
219
- Look for Slider by 10Web widget, then drag it to the widget area where you wish to display the slideshow. Write a Title for the widget and choose any slideshow using Select Slider drop-down menu. Press Save and the slider will appear on this widget area immediately.
220
-
221
- = How can I add layers to slides? =
222
-
223
- WordPress slider plugin provides powerful layer options, which help you enhance the display of your slideshow. This section of Slider by 10Web user guide will help you add them to your slides and fully customize them.
224
-
225
- The plugin is tuned up with the following types of layers, which can be added to each slide multiple times:
226
-
227
- * **Text,** allowing you to display a **text block** on your slides,
228
- * **Image,** which lets you place an **image layer** over the slide background image,
229
- * **Video,** which you can use to add a **self-hosted video** on the slide,
230
- * **Media Embed,** that adds **Youtube, Vimeo, Instagram, Flickr,** and **Dailymotion** media as slide layer,
231
- * **Social Buttons,** letting you place **Facebook, Google+, Twitter, Pinterest,** and **Tumblr** share buttons on your slides,
232
- * **Hotspot,** which adds an **animating spot** to slide. It displays additional text, when users hover the hotspot, and you can also add an onclick link to it.
233
-
234
- Click on a slide you wish to edit, and the layer buttons will appear under the main image. Press the one you wish to add to the selected slide, and let's begin customizing its settings.
235
-
236
- After a layer is added, a new toolbox becomes available, providing various customization options. Using the top bar, you can:
237
- * reorder the layer using drag-and-drop feature,
238
- * edit the title of the layer,
239
- * delete or copy it,
240
- * change its order number.
241
-
242
- Click on the gray bar to expand and edit all options of the layer. This section of user-friendly tools allows to fully personalize each layer. You are able to implement modifications such as:
243
-
244
- * specify the dimensions of layers,
245
- * set their positions on slides,
246
- * configure slide in and slide out animations effects,
247
- * modify their color, font style, transparency,
248
- * add unique classes for layers,
249
- * set links on each layer,
250
- * configure various on-click actions, such as playing/pausing slideshow,
251
- and much more.
252
-
253
- It is important to note, that Slider by 10Web plugin also allows you to reposition layers by dragging them around on the slide itself.
254
-
255
- = Can I move sliders from one site to another? =
256
-
257
- To save lots of time, WordPress slider plugin provides its **Import/Export** feature, letting you move created sliders from one site to another. With just a few clicks, you can have all slideshows uploaded and built on your second website.
258
-
259
- Prior to transferring the sliders, make sure to install Slider by 10Web to the destination site. Let's begin discussing exporting and importing options.
260
-
261
- **Exporting Sliders**
262
-
263
- Navigate to **Slider by 10Web > Sliders** page to export slideshows. Mark the sliders you would like to export, then select **Export** option from **Bulk Actions.** Afterwards, press **Apply** button and sliders will start downloading immediately.
264
-
265
- You can choose to transfer the slider with images and settings, or alternatively, just export the settings and add your own slides afterwards.
266
-
267
- **Importing Sliders**
268
-
269
- To import the downloaded sliders, go to **Slider by 10Web > Import** page first. Use **Choose File** button to browse the exported slider. Select the file, afterwards, click **Import** button. The slider will be added automatically.
270
-
271
- You can also import slideshows from Demo site and import them to your website. Just press the **Download** button below each slider, and follow the steps described above.
272
-
273
- = How do I insert the WordPress Slider into a Page or a Post? =
274
-
275
- To insert your slider into a page or post, add or edit the post/page where you wish to showcase the slideshow. Above the content editor, there is a button titled **Add Slider by 10Web.** All you need to do is to press this button, choose a slideshow using **Select a Slider** drop-down menu, then click **Insert.**
276
-
277
- The shortcode of your slideshow, e.g. [wds id="2"], will be added to the content of the page/post you are editing.
278
-
279
- In addition, you can add the shortcode manually by copying it from **Slider by 10Web > Sliders** page. Each slider shortcode is displayed next to the corresponding item, under **Shortcode** column.
280
-
281
- = Can I customize Slider settings to better fit my needs? =
282
-
283
- WordPress Slider plugin comes with a set of useful options which allow you to customize each slideshow independently. Having configured slideshows separately, you can publish multiple sliders on your website, each with its own unique design and purpose.
284
-
285
- Navigate to **Settings** tab of your slider to begin configuring its options.
286
-
287
- This toolbox consists of the following sections, each providing its own pack of user-friendly options.
288
-
289
- **Global**
290
-
291
- **Global** tab of **Slider Settings** includes general options for the slider. You can personalize the way your slider behaves and shows. You can:
292
- * modify its display type and dimensions,
293
- * set animation effect and its duration,
294
- * specify slider looping and shuffling settings,
295
- * change slideshow behavior on desktop and mobile devices,
296
- * set music to play along with the slider,
297
- * enable parallax effect for the slider, and much more.
298
-
299
- **Carousel**
300
-
301
- Have your slideshow appearing in Carousel mode by activating it from **Carousel** tab of **Slider Settings.** With these options, you can personalize the display of your slider carousel. You are able to:
302
- * change the number of images shown on carousel,
303
- * set the ratio of carousel image dimensions (width divided by height),
304
- * edit the styles of carousel background image, and more.
305
-
306
- **Navigation**
307
-
308
- Completely customize the way your slider navigates using the tools provided in **Navigation** section of **Slider Settings.** You are able to switch on:
309
- * mouse-click navigation (Next/Previous buttons),
310
- * mouse-swipe and mouse-wheel navigation,
311
- * touch-swipe navigation on mobile devices,
312
- * keyboard navigation with next/previous keys,
313
- * on-slider Play / Pause buttons,
314
- * as well as activate navigation buttons for your slider and style every attribute as you wish.
315
-
316
- **Bullets**
317
-
318
- Place **bullets** on your slider by activating them from this section. This feature lets users to easily navigate from one slide to another in a random sequence. This set of options lets you:
319
- * select to show bullets on hover or always,
320
- * set the position of slider bullets,
321
- * choose color, size and margin for them,
322
- * customize the bullets by uploading your own images, and more.
323
-
324
- **Filmstrip**
325
-
326
- Display a nifty **filmstrip** of slide thumbnails along with your slider. This is a neat way to showcase miniatures of your slides before users click to view their larger versions. You can customize the filmstrip by:
327
- * changing its position on the slider,
328
- * setting background color and inactive thumbnail transparency,
329
- * specify thumbnail dimensions and separator size,
330
- * customize the border of the active thumbnail.
331
-
332
- **Timer bar**
333
-
334
- Activating **Timer bar** lets you have a neat loading bar with each slide. The loading bar starts every time a slide displays, and ends when the slideshow switches to the next image during autoplay.
335
-
336
- You can customize the type of the Timer bar, as well as its size, color and transparency.
337
-
338
- **Watermark**
339
-
340
- You are able to add watermark to the main images of your slider with the options Watermark section provides. Choose the type of the watermark, text or image, then configure settings such as:
341
- * providing watermark text or image URL,
342
- * specifying font size, font style and color of watermark text.
343
- * setting the size of the watermark image, and select the position of the watermark.
344
- * Press Set Watermark to add the watermark text or image to main images of your slider. To remove it, simply click on Reset Watermark button.
345
-
346
- = Can I use Slider by 10Web to create different sliders for different pages? =
347
-
348
- Yes, you can create unlimited number of sliders with unlimited amount of slides. Then you may paste corresponding slider code within each page.The slider shortcodes are listed next to the slider in **Slider by 10Web > Slider** section.
349
-
350
- = Can I add a slider into a custom PHP template of my website theme? =
351
-
352
- In case you use custom PHP templates and would like to display your slideshow on these pages, you can use **PHP function** Slider by 10Web plugin provides. You just need to add the function, e.g.:
353
-
354
- *<?php if (function_exists('wd_slider'))
355
- {
356
- wd_slider(2);
357
- }
358
- ?>*
359
-
360
- into the necessary .php file. For instance, if you wish to display the slideshow along with the header, simply add the code to header.php file of your website theme. You can find the function and copy it from **Slider by 10Web > Sliders** page, under **PHP function** column.
361
-
362
- = Is it possible to add watermark to slider images? =
363
-
364
- You are able to add watermark to the main images of your slider with the options **Slider Settings > Watermark** section provides. Choose the type of the watermark, **text** or **image,** then configure settings such as:
365
-
366
- * providing watermark **text** or **image URL,**
367
- * specifying **font size, font style** and **color** of watermark text.
368
- * setting the **size** of the watermark image,
369
- * and select the **position** of the watermark.
370
-
371
- Press **Set Watermark** to add the watermark text or image to main images of your slider. To remove it, simply click on Reset Watermark button.
372
-
373
- = Does Slider by 10Web support Google fonts? =
374
-
375
- Slider by 10Web does support Google Fonts. This allows you to custom text layer over slides using the provided big variety of Google Fonts.
376
-
377
- You can change the fonts of a layer by editing it. Look for **Font family** option to enable **Google Fonts,** then select the font family you wish to use.
378
-
379
- = What are the most common applications of this wordpress responsive plugin? =
380
-
381
- This free slider plugin can be used for showcasing your portfoliow with the help of:
382
- * Image slider,
383
- * video slider (specifically vimeo slider, youtube slider, HTML5 slider),
384
- * post slider,
385
- * product slider,
386
- * photo slider / gallery slider,
387
- * carousel slider and more.
388
-
389
- Thes content slider options are the most commonly used applications of the best slider plugin, but those can be expanded to meet the needs. You can combine images into multi-layer content with videos and carousel slideshow effect or display video layers.
390
-
391
- = Is this a good plugin for creating a post slider? =
392
-
393
- The plugin allows embedding WordPress posts making it a great WordPress Posts slider with various functionality and content slideshow. This is also useful in case you wish to have a product slider. You can add your products as posts and display them on your slideshow.
394
-
395
- Moreover, it can be turned into custom post types slider or a content slider with various layers, images and animations. This will help to create product carousel/image carousel with ecommerce plugins or photo slideshow with gallery plugin and even more.
396
-
397
- The good part of this is that you can have a text slider with its picture slide, while keeping up with responsive post slider if compared with other post slider or banner slider plugins. This image slideshow plugin has all the necessary features for creating various kinds of wonderful CSS3 slider.
398
-
399
- = Can I post links on slider images using this slider plugin? =
400
-
401
- You can post a redirection link on the image, allowing the user to get to the mentioned post or page upon clicking on the slide. Please note, that with this WordPress responsive slider plugin, you need to use *http://* and *https://* for external links.
402
-
403
- = Why is my watermark not showing on image? =
404
- Watermark may not work because of the following reasons:
405
-
406
- * If you add slider images by embedding them from an external link,
407
- * If your GD2 library is switched off on your server,
408
- * If the image you have uploaded is larger than the slider dimensions you have set in settings.
409
- The last point means that if you have placed the watermark on the angles of the image, it will not be visible because the slider image will be cut off.
410
-
411
- So, please try the following:
412
- * Make sure to upload images in slider plugin, instead of embedding it from an external URL,
413
- * make sure to have your server’s GD2 library on,
414
- * resize the slideshow images and set the same dimensions as in **Slider Settings** before uploading.
415
-
416
- If you post a watermark on the slider plugin and it does not appear on the image, you can check the watermark position firstly. Please open **Slide Options** section, and use **Fillmode** to change the appearance of the slide background. By changing the fillmode option, you can see in which mode the watermark looks good on WordPress responsive slider images.
417
-
418
- = Can I post social media buttons to slides using WordPress responsive slider ? =
419
- Premium version of Slider by 10Web plugin allows you to place social media layers. Under each image of your slider, you’ll see **Add Social Media Button Layer** button.
420
-
421
- Press it to add to your slide. You also are able to customize these buttons using layer settings.
422
-
423
- = Can I add custom navigation buttons? =
424
-
425
- You can add your own custom navigation images instead of buttons in WordPress responsive slider plugin. You can also manage default buttons by customizing sizes, colors, border and background colors.
426
-
427
- To add custom buttons in slider plugin please enter **Settings > Navigation** section and find **Image for next / previous buttons.** Select **Custom** and upload images for each button.
428
-
429
- = Does WordPress responsive slider allow to post the same layer on different images? =
430
-
431
- Slider plugin lets you use the same text layer, image layer, video layer for all slider images. After adding the layer, you can mark the **Static layer** option and the layer will be visible on all slides.
432
-
433
- = Does slider plugin take the full width if I post it as a widget? =
434
- The plugin takes the full width of the widget area if the **Boxed Layout** in **Slider Settings** is checked. Please note that the option you can find in the **Global Options** section, rather than in the widget settings.
435
-
436
- == Screenshots ==
437
- 1. Slider by 10Web - Slider 1
438
- 2. Slider by 10Web - Slider 2
439
- 3. Slider by 10Web - Slider 3
440
- 4. Slider by 10Web - Slider 4
441
- 5. Slider by 10Web - Edit Slider
442
- 6. Slider by 10Web - Settings
443
- 7. Slider by 10Web - Global Options
444
-
445
-
446
- == Changelog ==
447
-
448
-
449
- = 1.2.26 =
450
- * Added: Slider edit links for Elementor widget.
451
-
452
- = 1.2.25 =
453
- * Fixed: Newly added slider preview image.
454
- * Fixed: Leave page message for newly published slider.
455
- * Removed: Google+.
456
- * Fixed: Some settings in Options do not work.
457
- * Fixed: PHP Notices from Slider in log file.
458
-
459
- = 1.2.24 =
460
- * Added: Banner to install 10Web manager.
461
-
462
- = 1.2.23 =
463
- * Fixed: Security issue.
464
-
465
- = 1.2.21 =
466
- * Changed: PHP function shortcode check if function exists.
467
- * Fixed: Do not print js before DOCTYPE.
468
- * Fixed: Error when clicking allow or skip to collect some usage data more then once.
469
-
470
- = 1.2.20 =
471
- * Added: Message during import for PHP XML and ZipArchive PHP extensions.
472
- * Added: The Separate section for 10Web Plugins in Elementor.
473
- * Fixed: Add Layer click action.
474
- * Changed: User guide links.
475
- * Changed: Analytics trackable links.
476
-
477
- = 1.2.19 =
478
- * Fixed: WD library.
479
-
480
- = 1.2.18 =
481
- * Added: Elementor widget.
482
-
483
- = 1.2.17 =
484
- * Fixed: Bug on restarting slider.
485
- * Fixed: Smart crop functionality.
486
- * Updated: Free users library.
487
-
488
- = 1.2.16 =
489
- * Fixed: Rendering in Elementor builder.
490
- * Changed: Navigation buttons showing delay on hover.
491
- * Changed: Links to 10Web.io.
492
- * Changed: Demo slider download buttons and images.
493
-
494
- = 1.2.14 =
495
- * Fixed: Add shortcode functionality on Beaver, Elementor, SiteOrigin and Visual Composer builders.
496
- * Fixed: Set/Reset watermark functionality.
497
- * Fixed: Conflict with Fast Velocity Minify plugin with minified js.
498
-
499
- = 1.2.13 =
500
- * Fixed: Text layer fixed step position.
501
- * Fixed: Bug on slider preview.
502
- * Fixed: Slider autoplay with multiple sliders on one page.
503
- * Changed: Video autoplay on some browsers.
504
-
505
- = 1.2.12 =
506
- * Changed: Separate buttons for deactivation.
507
-
508
- = 1.2.11 =
509
- * Fixed: Callback functionality.
510
- * Added: GDPR compliance (Privacy suggestion text).
511
- * Fixed: Bug on circle timer.
512
-
513
- = 1.2.10 =
514
- * Updated: WD Library (added GDPR Compliance).
515
-
516
- = 1.2.9 =
517
- * Fixed: Rapid movement of slider.
518
- * Added: Gutenberg integration.
519
-
520
- = 1.2.8 =
521
- * Fixed: Layer effect in animation in some case.
522
-
523
- = 1.2.7 =
524
- * Fixed: Minor bug depend on PHP version.
525
-
526
- = 1.2.6 =
527
- * Changed: Main PHP file structure.
528
- * Changed: GET variable in slider edit page.
529
- * Fixed: Keyboard, Mouse swipe, Touch swipe navigation.
530
-
531
- = 1.2.5 =
532
- * Added: Insert slide image from URL.
533
- * Fixed: Full width slider height.
534
- * Fixed: Bug on PHP 7.2.0 version.
535
- * Changed: Overview page.
536
-
537
- = 1.2.4 =
538
- * Removed: Notification
539
-
540
- = 1.2.3 =
541
- * Fixed: Some js and css conflicts with other plugins and builders.
542
- * Fixed: Install Demo slides.
543
- * Changed: Overview page.
544
-
545
- = 1.2.2 =
546
- * Added: Background fill mode for slide.
547
- * Added: Auto height functionality for full width slider.
548
- * Added: Option to stretch slider to fill parent container.
549
- * Fixed: Video layer autoplay bug.
550
-
551
- = 1.2.1 =
552
- * Changed: Deactivation popup.
553
-
554
- = 1.2.0 =
555
- * Changed: Improved user interface of sliders.
556
- * Fixed: Reset settings.
557
- * Fixed: Import slider on Windows servers.
558
- * Added: Support forum and Review links.
559
-
560
- = 1.1.92 =
561
- * Added: Show notification to install Image Optimizer WD plugin on plugin pages.
562
-
563
- = 1.1.91 =
564
- * Changed: Show notification to install Backup WD plugin only on plugin pages.
565
-
566
- = 1.1.90 =
567
- * Removed: Popup to install Backup WD plugin.
568
-
569
- = 1.1.89 =
570
- * Added: Show popup notice to install Backup WD plugin.
571
-
572
- = 1.1.88 =
573
- * Fixed: Overview page conflict.
574
- * Fixed: Conflict with Jetpack Contact Form module.
575
-
576
- = 1.1.87 =
577
- * Fixed: Updated library to prevent conflict with PHP version 7.
578
-
579
- = 1.1.86 =
580
- * Improved: Audio file validation.
581
-
582
- = 1.1.85 =
583
- * Fixed: Do not insert a shortcode if no slider is selected.
584
-
585
- = 1.1.84 =
586
- * Improved: Translatable backend
587
- * Improved: Compatibility with jQurey 3.2.1
588
-
589
- = 1.1.83 =
590
- * Fixed: HTML attribute validation.
591
-
592
- = 1.1.82 =
593
- * Fixed: Security issue in filemanager.
594
-
595
- = 1.1.81 =
596
- * Fixed: Uninstall.
597
- * Fixed: Youtube video autoplay in some case.
598
-
599
- = 1.1.80 =
600
- * Fixed: Slider direction with two slides.
601
-
602
- = 1.1.79 =
603
- * Changed: Minimum font size validation.
604
-
605
- = 1.1.78 =
606
- * Added: Apply layer global options to existing layers.
607
- * Changed: Removed support forum link.
608
-
609
- = 1.1.77 =
610
- * Added: Minimum font size for text layers
611
-
612
- = 1.1.76 =
613
- * Added: Support forum link.
614
-
615
- = 1.1.75 =
616
- * Improved: Fonts.
617
-
618
- = 1.1.74 =
619
- * Added: Default options for layers.
620
- * Added: Overview page.
621
- * Fixed: Google fonts bug.
622
-
623
- = 1.1.73 =
624
- * Fixed: Deleting newly added slides and layers.
625
- * Fixed: Slider height with horizontal filmstrip.
626
- * Fixed: Share slides.
627
- * Fixed: Scroll load.
628
- * Fixed: Video slide and layer poster in backend.
629
- * Fixed: Image thumbnail in backend with single quote in name.
630
-
631
- = 1.1.72 =
632
- * Fixed: Warrning in admin popups.
633
- * Fixed: Required field validation.
634
- * Changed: Scroll load in filemanager.
635
-
636
- = 1.1.71 =
637
- * Fixed: Save as copy.
638
-
639
- = 1.1.70 =
640
- * Added: Slides order direction (optional).
641
- * Fixed: Filemanager allowed file types.
642
- * Fixed: Zoomfade effect.
643
-
644
- = 1.1.69 =
645
- * Fixed: Transition effect bug.
646
-
647
- = 1.1.68 =
648
- * Added: Animation iteration count.
649
- * Fixed: Sliders import.
650
-
651
- = 1.1.67 =
652
- * Added: Full width slider on small screens.
653
-
654
- = 1.1.66 =
655
- * Fixed: Sanitize folder names in filemanager.
656
-
657
- = 1.1.65 =
658
- * Fixed: Fixed background videos.
659
- * Changed: "Select slider to use settings from" option on sliders merge.
660
-
661
- = 1.1.64 =
662
- * Fixed: Upload only images zip.
663
- * Fixed: Removed empty line breaks from inline javascipt to prevent conflict with some themes.
664
- * Fixed: Zoom Fade effect on Google Chrome browser.
665
-
666
- = 1.1.63 =
667
- * Fixed: New line in text layer.
668
- * Fixed: Carousel view.
669
-
670
- = 1.1.62 =
671
- * Added: Static layers.
672
-
673
- = 1.1.61 =
674
- * Added: Alignment for text layer.
675
-
676
- = 1.1.60 =
677
- * Added: Two way slideshow. Slideshow can go backwards if someone switch to a previous slide.
678
-
679
- = 1.1.59 =
680
- * Changed: UploadHandler class name to prevent conflict with some themes.
681
- * Fixed: Layer styles conflict with some themes.
682
- * Changed: Dutch translations by Piet Kok.
683
-
684
-
685
- = 1.1.58 =
686
- * Added: Link to slide.
687
- * Fixed: Click action for carousel view.
688
-
689
- = 1.1.57 =
690
- * Added: Possibility to change loading icon.
691
-
692
- = 1.1.56 =
693
- * Fixed: Slider with fixed background.
694
- * Fixed: Buttons styles in backend.
695
-
696
- = 1.1.55 =
697
- * Added: Merge sliders.
698
- * Fixed: Double quotes in custom javascript.
699
-
700
- = 1.1.54 =
701
- * Fixed: Layer RotatInDownRight effect saving.
702
-
703
- = 1.1.53 =
704
- * Fixed: Slider add new button under the message.
705
-
706
- = 1.1.52 =
707
- * Added: Option to hide slider on mobile.
708
-
709
- = 1.1.51 =
710
- * Fixed: Active thumbnail in carousel view.
711
- * Changed: Loading gif.
712
-
713
- = 1.1.50 =
714
- * Changed: Featured themes page.
715
-
716
- = 1.1.49 =
717
- * Added: Text layer alignment option.
718
-
719
- = 1.1.48 =
720
- * Fixed: Preview popup.
721
- * Fixed: Add posts popup styles.
722
- * Fixed: Loading in filemanager.
723
- * Fixed: Resetting layer positions on parallax sliders on touch leave.
724
-
725
- = 1.1.47 =
726
- * Fixed: Case sensitive search by name in Filemanager bug.
727
- * Changed: Show last uploaded files as first in Filemanager.
728
- * Changed: File manager design.
729
- * Fixed: Sliders duplicate.
730
-
731
- = 1.1.46 =
732
- * Changed: Updated Font Awesome to 4.6.3 version.
733
- * Fixed: Slider margin responsiveness.
734
- * Fixed: Effect processing direction for slider with two slides.
735
-
736
- = 1.1.45 =
737
- * Added: Option whether include scripts only on necessary pages or no.
738
-
739
- = 1.1.44 =
740
- * Fixed: Conflict with "Yoast SEO" plugin.
741
- * Fixed: Case sensitive search by name in Filemanager bug.
742
- * Changed: Show last uploaded files as first in Filemanager.
743
-
744
- = 1.1.43 =
745
- * Changed: Support for new version of Google Fonts.
746
-
747
- = 1.1.42 =
748
- * Fixed: Interval for checking for updates.
749
- * Fixed: Parallax effect on mobile.
750
- * Fixed: Video autoplay bug.
751
- * Changed: Featured plugins page.
752
-
753
- = 1.1.41 =
754
- * Added: Hover color for text layer
755
-
756
- = 1.1.40 =
757
- * Fixed: Link the slide in carousel view.
758
- * Fixed: Specialchars in text layer.
759
- * Changed: Slider bulk actions.
760
-
761
- = 1.1.39 =
762
- * Fixed: Minor bugs.
763
- * Changed: Do not change the slide until slide loads.
764
- * Fixed: Instagram slides.
765
- * Fixed: Embed media by YouTube short url.
766
-
767
- = 1.1.38 =
768
- * Fixed: Slider display bug after previous update.
769
-
770
- = 1.1.37 =
771
- * Changed: Add scripts and styles only on pages where necessary.
772
-
773
- = 1.1.36 =
774
- * Changed: Save relative urls in database instead of absolute urls.
775
-
776
- = 1.1.35 =
777
- * Fixed: Save slider with big amount of slides.
778
- * Fixed: Sliders pagination styles.
779
- * Fixed: Vimeo autoplay.
780
-
781
- = 1.1.34 =
782
- * Added: No sliders found message.
783
- * Fixed: Add images on new slider.
784
- * Fixed: Duplicate sliders.
785
- * Fixed: Add posts page styles.
786
-
787
- = 1.1.33 =
788
- * Added: Function with sliders return value.
789
- * Changed: Featured plugins page.
790
-
791
- = 1.1.32 =
792
- * Fixed: Conflict with "Wordfence Security" plugin.
793
- * Added: Hotspot text on click/hover(optional).
794
-
795
- = 1.1.31 =
796
- * Fixed: Add post page styles on Wordpress 4.5
797
- * Fixed: Undefined iframes in frontend.
798
- * Fixed: Filmstrip responsiveness.
799
-
800
- = 1.1.30 =
801
- * Changed: Add font-family without saving whole slider.
802
-
803
- = 1.1.29 =
804
- * Added: Text, image, hotspot layers click actions.
805
-
806
- = 1.1.28 =
807
- * Added: Slider loop option.
808
- * Changed: Featured plugins, themes page.
809
-
810
- = 1.1.27 =
811
- * Added: Possibility to add font family to google fonts.
812
-
813
- = 1.1.25 =
814
- * Fixed: Slider by 10Web media uploader files with withespaces in name.
815
- * Added: Option for hotspot animation.
816
- * Added: Video loop and related video options.
817
-
818
- = 1.1.24 =
819
- * Updated: Google fonts list.
820
-
821
- = 1.1.23 =
822
- * Fixed: Bug in layer effect
823
-
824
- = 1.1.22 =
825
- * Changed: Some guidelines.
826
-
827
- = 1.1.21 =
828
- * Added: Google fonts scripts (greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic).
829
- * Changed: Featured plugins and themes pages.
830
-
831
- = 1.1.20 =
832
- * Added: Possibility to add class to layers.
833
-
834
- = 1.1.19 =
835
- * Fixed: Conflict with some themes.
836
- * Fixed: Dutch in translation (Thanks to Hielke Brandsma).
837
-
838
- = 1.1.18 =
839
- * Improved: Filemanager load time.
840
-
841
- = 1.1.17 =
842
- * Fixed: Newly added parameters on duplicate.
843
-
844
- = 1.1.16 =
845
- * Changed: User Manual links.
846
- * Fixed: Vimeo embed videos pause bug on slide change.
847
-
848
-
849
- = 1.1.15 =
850
- * Fixed: Slider autoplay duration depend on Youtube video duraton.
851
- * Fixed: Text bullets activate color.
852
-
853
- = 1.1.14 =
854
- * Added: Slide names as bullets.
855
-
856
- = 1.1.13 =
857
- * Fixed: Shortcode in custom container.
858
-
859
- = 1.1.12 =
860
- * Fixed: Verify nonce on embed media.
861
- * Added: Carousel background image angle, grayscale, transparency options.
862
-
863
- = 1.1.11 =
864
- * Added: New year promo notice
865
-
866
- = 1.1.10 =
867
- * Fixed: Filemanager vulnerability. Thanks to Mika Epstein.
868
-
869
- = 1.1.9 =
870
- * Fixed: Licensing page.
871
- * Fixed: Plugin direction for icons.
872
- * Changed: Featured themes page.
873
-
874
- = 1.1.8 =
875
- * Fixed: Slider callback page responsiveness.
876
- * Fixed: Keyboard navigation blocks spacebar.
877
-
878
- = 1.1.7 =
879
- * Added: Slider callback.
880
- * Fixed: Styles for Wordpress 4.4.
881
- * Fixed: Slider on Firefox.
882
-
883
- = 1.1.6 =
884
- * Fixed: HTML validation.
885
-
886
- = 1.1.5 =
887
- * Changed: Featured plugins page.
888
-
889
- = 1.1.4 =
890
- * Fixed: File manager styles.
891
- * Fixed: Stay on current tab after save.
892
-
893
- = 1.1.3 =
894
- * Fixed: Shortcode puts in html tags for some themes.
895
- * Changed: Enlarge title container in admin.
896
- * Changed: Add slide button.
897
- * Fixed: Carousel load.
898
-
899
- = 1.1.2 =
900
- * Added: Smart crop.
901
-
902
- = 1.1.1 =
903
- * Fixed: Backend styles.
904
- * Fixed: Check all in add post popup.
905
-
906
- = 1.1.0 =
907
- * Changed: Backend design.
908
- * Changed: Responsive backend.
909
-
910
- = 1.0.50 =
911
- * Fixed: Border sizing problem with image wrap.
912
-
913
- = 1.0.49 =
914
- * Added: Shortcode support in text layers.
915
-
916
- = 1.0.48 =
917
- * Fixed: Controll buttons in sites with different site and admin urls.
918
-
919
- = 1.0.47 =
920
- * Added: Fixed background slider.
921
-
922
- = 1.0.46 =
923
- * Changed: Default uploader.
924
-
925
- = 1.0.45 =
926
- * Changed: Demo Sliders.
927
-
928
- = 1.0.44 =
929
- * Fixed: Video sliders export without videos and thumbnails.
930
- * Fixed: Single quote in css.
931
- * Changed: Loading styles.
932
-
933
- = 1.0.43 =
934
- * Added: Show thumbnail on bullets hover.
935
- * Fixed: First slide with single quotes in name.
936
- * Fixed: Video slide/layer export/import with featured image.
937
- * Fixed: Hide slider play /pause button on video slides.
938
-
939
- = 1.0.42 =
940
- * Added: Possibility to add font family.
941
- * Fixed: "Link the slide to:" option save.
942
- * Changed: No image, no video images.
943
- * Changed: Notices show order.
944
-
945
- = 1.0.41 =
946
- * Added: Video slide/layer.
947
- * Fixed: Line break in text, hotspot layer on export/import.
948
-
949
- = 1.0.40 =
950
- * Added: Swipe for filmstrip.
951
- * Added: Mousewheel and keyboard navigation methods.
952
- * Changed: Make touch navigation optional.
953
-
954
- = 1.0.39 =
955
- * Fixed: Flashing only on first transition during fade effect.
956
-
957
- = 1.0.38 =
958
- * Changed: Embed autoplay on slider autoplay.
959
- * Fixed: Embed video poster.
960
- * Changed: Featured plugins page.
961
-
962
- = 1.0.37 =
963
- * Added: Support/rate us messages.
964
-
965
- = 1.0.36 =
966
- * Changed: Filmstrip navigation arrows show on hover.
967
-
968
- = 1.0.35 =
969
- * Changed: Compability with Wordpress 4.3.
970
- * Changed: Filmstrip separator.
971
- * Changed: Message classes.
972
-
973
- = 1.0.34 =
974
- * Added: Google fonts.
975
-
976
- = 1.0.33 =
977
- * Added: Option to display bullets on hover.
978
-
979
- = 1.0.32 =
980
- * Added: Option for mouse swipe navigation.
981
-
982
- = 1.0.30 =
983
- * Fixed: Removed editor button from hotspot layer.
984
- * Added: Demo sliders page.
985
-
986
- = 1.0.29 =
987
- * Fixed: Multiple sliders in a page.
988
-
989
- = 1.0.28 =
990
- * Fixed: Embed slide as first slide.
991
- * Changed: Licensing page.
992
-
993
- = 1.0.27 =
994
- * New: Slider preview in admin.
995
- * Changed: Improved slide load.
996
- * Fixed: Play/pause button.
997
-
998
- = 1.0.26 =
999
- * New: Parallax effect.
1000
-
1001
- = 1.0.25 =
1002
- * Fixed: security issue.
1003
- * Changed: Manage buttons position.
1004
-
1005
- = 1.0.24 =
1006
- * Changed: YouTube, Vimeo embed.
1007
- * New: Instagram, Flickr and Dailymotion embed.
1008
-
1009
- = 1.0.23 =
1010
- * New: Hotspot layer (pro version).
1011
-
1012
- = 1.2.22 =
1013
- * New: Search by name in file manager.
1014
-
1015
- = 1.0.21 =
1016
- * Changed: Featured plugins page.
1017
-
1018
- = 1.0.20 =
1019
- * Fixed: Slider playback direction.
1020
-
1021
- = 1.0.19 =
1022
- * Fixed: Slider width/height problem after Chrome update.
1023
- * Fixed: Export.
1024
- * Fixed: Carousel slider with one slide.
1025
-
1026
- = 1.0.18 =
1027
- * Fixed: Conflict with some themes.
1028
-
1029
- = 1.0.17 =
1030
- * New: Slider Export/Import.
1031
- * Fixed: Delete slides whitout layers on slider delete.
1032
- * Fixed: Image change effect in carousel views whith one image.
1033
- * Fixed: Removed "There is no slider selected or the slider was deleted." error message for unpublished sliders.
1034
- * Fixed: Carousel view after Chrome update(23.05.15).
1035
- * Fixed: Activate first slide tab after slider duplication.
1036
- * Fixed: Active bullet and filmstrip thumbnail in carousel view.
1037
-
1038
- = 1.0.16 =
1039
- * Changed: Featured plugins page.
1040
- * New: Featured themes page.
1041
-
1042
- = 1.0.15 =
1043
- * Change links.
1044
-
1045
- = 1.0.14 =
1046
- * Fixed: Disable enter key on text inputs.
1047
- * New: Bulk add images by media uploader.
1048
-
1049
- = 1.0.13 =
1050
- * Fixed: Image layer alt.
1051
- * Fixed: Word break in Chrome.
1052
-
1053
- = 1.0.11 =
1054
- * Fixed: Timer bar and bullets postion with horizontal filmstrip.
1055
- * Fixed: Set watermark.
1056
-
1057
- = 1.0.10 =
1058
- * Fixed: Slide change direction from 9 to 10.
1059
- * Fixed: Layers with "Start with slide" option.
1060
-
1061
- = 1.0.9 =
1062
- * Update licensing page
1063
-
1064
- = 1.0.8 =
1065
- * New: Start with slide option.
1066
- * New: Effect duration option.
1067
-
1068
- = 1.0.7 =
1069
- * New: Circle timer.
1070
- * New: Slider duplication.
1071
- * Fixed: Disable swipe on navigation off.
1072
- * Fixed: Layer click on 3D animations.
1073
-
1074
- = 1.0.6 =
1075
- * custom play/pause buttons
1076
- * slide duplication
1077
-
1078
- = 1.0.5 =
1079
- * Image for Next / Previous buttons (Default, Custom, Styled)
1080
- * Image for bullets (Default, Custom, Styled)
1081
-
1082
- = 1.0.4 =
1083
- * stop on hover option
1084
- * slide, text layer, image layer link open in a new window option
1085
-
1086
- = 1.0.3 =
1087
- * single quota in image name (bug fixed)
1088
-
1089
- = 1.0.2 =
1090
-
1091
- * Turn SliderWD Media Upload
1092
- * Ajax save
1093
- * Images Bulk Add
1094
- * Timer bar bug fixed
1095
- * change shortcode button
1096
- * fullwidth slider margin bug fixed
1097
-
1098
- = 1.0.1 =
1099
- * User manual links added.
1100
-
1101
- = 1.0.0 =
1102
- * Initial version.
1103
-
 
 
 
 
1
+ === Slider by 10Web - Responsive Image Slider ===
2
+ Contributors: webdorado,10web
3
+ Tags: responsive slider, slider, slideshow, wordpress slider, image slider, gallery slider, images slider, Photo Slider, post slider, slider plugin
4
+ Requires at least: 3.4
5
+ Tested up to: 5.2
6
+ Requires PHP: 5.2
7
+ Stable tag: 1.2.27
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Slider by 10Web plugin is the perfect slider solution for Wordpress. Create a great responsive slideshow, image slider, layer slider, video slider and post slider with Slider by 10Web.
12
+
13
+ == Description ==
14
+
15
+
16
+ https://www.youtube.com/watch?v=xebpM_-GwG0&index=1&list=PLnxWPiY5tLFWQf5XaEYYPZj0gdggUrVxP
17
+
18
+ = Useful Links: =
19
+ [Special Offer for all Premium Plugins](https://10web.io/plugins-bundle-pricing/)
20
+ [WordPress Slider Plugin](https://10web.io/plugins/wordpress-slider/)
21
+ [Demo](https://demo.10web.io/slider/)
22
+ [User Manual](https://docs.10web.io/docs/slider-wd/indroduction.html)
23
+ [Support Forum](https://wordpress.org/support/plugin/slider-wd)
24
+
25
+
26
+ Slider by 10Web is a versatile solution to help you add fast loading, responsive and SEO-friendly sliders to your website pages, posts, theme header or any other location. The plugin supports both images and videos on the slides, which further could be spiced up with various transition effects. Filmstrip, carousel and parallax effects of Premium version will have your slides look even better. You can create multi-functional sliders in Premium version, by applying text, image, video, hotspot and social media button layers to the slides. Every feature of the slides, from text size, navigation buttons to slide loading icon, can be customized, giving you a myriad of options to experiment with style and design. It’s by far the easiest solution to create beautiful sliders, which you can add to your website with a shortcode, by inserting into the theme using the PHP function or through widget. Slider by 10Web supports swipe control to make sure your slides look great on touchscreen devices. If you’re looking for power-packed slider plugin which is also user-friendly, go ahead, download it and test the plugin yourself.
27
+
28
+ == Benefits ==
29
+ * **User engagement** - Sliders are engaging. Once you add beautiful slides to your posts or pages with some high quality images and appealing styling, you may observe improved user engagement rates.
30
+ * **Better user experience** - With its swipe control support Slider by 10Web will provide better user experience on your website. No matter the device or the screen size you can make sure your slides will perform as they should.
31
+ * **Differentiation** - From simple text color and fonts, to hotspot animation and effect duration, there are almost unlimited styling options you can try. Factor in support for custom CSS and you will have more space and flexibility with the styling of your sliders.
32
+ * **High level of personalization** - One of the best things about Slider by 10Web is its flexibility! You can adjust and customize every aspect of your slides.You can play with all the features of the slides and have them match with your website’s design and overall look and feel.
33
+ * **Grabbing users’ attention** - Since the sliders can be basically placed anywhere on your website, it’s a great way to bring attention to any information you want to highlight. Whether it’s an announcement, new post, or just one of your recent video tutorials, you can make sure it will catch the eye.
34
+ * **Easy to set up, use and customize** - Plugin was developed with users in mind. Anyone from beginners to WordPress profs will be able to easily create and customize the sliders without any coding skills.
35
+ * **Get Support** - Ger timely and effective support to all its users. We keep standards high and response time low.
36
+
37
+
38
+ == What’s in it ==
39
+
40
+ = UNLIMITED SLIDES AND SLIDERS =
41
+
42
+ Slider by 10Web allows you to add unlimited number of sliders to your website with as many slides as you want. Easily insert the sliders to any of your posts or pages with the generated shortcode.
43
+
44
+
45
+ = MULTIPLE LAYERS =
46
+
47
+ The Premium version allows for creation of multi-functional sliders using the available image, text, video , social media and hotspot layers. Apart from uploading video files from your pc, you can also embed media from YouTube, Vimeo, Instagram, Flickr or Dailymotion using the file’s URL.
48
+
49
+
50
+ = MULTIPLE TRANSITION AND LAYER EFFECTS =
51
+
52
+ Slider by 10Web Premium version offers 27 slide transition and 38 mind-blowing layer effects to give your slides a distinct look. You can specify the start/end point of the effects, as well as specify the effect duration.
53
+
54
+
55
+ = IMAGE WATERMARKING =
56
+
57
+ Add text and image watermarks to your slides, by selecting the size, transparency, and one of the available nine watermark positions.
58
+
59
+ = SOCIAL SHARING BUTTONS =
60
+
61
+ Add a social sharing buttons’ layer to your slides in Premium version. You can customize almost every aspect of the buttons and enable your visitors to share your slides across the major social media platforms, like Facebook, Google +, Twitter, Pinterest and Tumbler.
62
+
63
+ = PARALLAX AND CAROUSEL SUPPORT =
64
+
65
+ Premium version adds Parallax and carousel support. You can set to display the slides in carousel view, which shows the main image at the foreground, while having the rest of the images at the background. The parallax effect will create modern 3D-like effects on the slides and take them to the next level.
66
+
67
+ = SLIDER EXPORT/IMPORT =
68
+
69
+ If you want to export/import your slides from one website to another, that’s absolutely doable with Slider by 10Web Premium version. You can choose to transfer the slider with pictures and settings, or you can transfer only the settings of the slider and then add your images afterwards.
70
+
71
+ = SETTINGS/CUSTOMIZATION =
72
+ *Some customizations described here are available in Premium version. Please refer to feature summary for additional info.
73
+
74
+ Slider by 10Web has an intuitive drag and drop interface, which makes it easy to create, organize and customize your slides. All the slider options as well as the plugin overview is available at the admin panel. This is basically where you can create the sliders and make the necessary changes as you go. Under the plugin’s global options, you’ll find the default options for layers and some other general settings, such as enabling Slider by 10Web media upload, choosing the loading icon,adding font families, etc. All the other options for customizing the slides can be found under the sliders section, the place where you can actually start adding new slides. The user friendly interface lets you easily add images and videos to the slides, as well as embed media from popular social platforms. Beneath the added slides you’ll find the available layers that you can apply to them, each of the layers coming with its own set of settings. Before you save the final version of the slide you can preview all the changes you’ve made. At the top of the page,you’ll also find a settings icon,where you can configure the settings for the slider you’re working on. From this section you can activate carousel view, give custom styling to bullets and buttons, adjust settings for filmstrip view, as well as configure the settings for watermarking. Also, you can add custom CSS to the slides for the additional styling features.
75
+
76
+
77
+ [Premium version adds](https://10web.io/plugins/wordpress-slider/)
78
+
79
+ * 27 Transition effects for slider
80
+ * 38 Layer effects
81
+ * Support for posts in the slides
82
+ * Video Slide support (YouTube slider and Vimeo slider)
83
+ * Dailymotion, Instagram and Flickr embed
84
+ * Layers (text, image and media embed)- Video Manual
85
+ * Social sharing buttons layer (Google+, Tumblr, Twitter, Pinterest and Facebook)
86
+ * Hotspot layer
87
+ * Filmstrip support
88
+ * Custom styles for navigation buttons/bullets
89
+ * Support for Parallax Slider
90
+ * Support for Carousel effect
91
+ * Video Slide and layer (mp4)
92
+ * Slider Export/Import.
93
+
94
+
95
+ ###IMPORTANT:
96
+ If you think you found a bug in Slider by 10Web or have any problem/question concerning the plugin, please check out [WordPress Slider Support Forum](https://wordpress.org/support/plugin/slider-wd) in our website. If you do not find a solution here, do not hesitate to [click here to contact us](https://10web.io/contact-us/).
97
+
98
+
99
+ == Installation ==
100
+
101
+ #### Thank you for your interest in Slider by 10Web.
102
+
103
+ **Installing via WordPress**
104
+ Follow the steps below to install Slider by 10Web to your website.
105
+ Log-in to your WordPress administrator panel.
106
+ Select Plugins page from toolbar menu, click Add New.
107
+ Search for Slider by 10Web in the right-top search bar if you want to download the Free version or click Upload Plugin button > “Choose file” (“Browse”) and select the Slider by 10Web zip file if you are installing the Professional version of Slider by 10Web.
108
+
109
+ For Mac Users
110
+ Go to your Downloads folder and locate the folder with the Slider by 10Web. Right-click on the folder and select Compress. This will create a .zip file which can be installed as described below:
111
+ Click “Upload & Install” button.
112
+ Click “Activate Plugin” button for activating the plugin.
113
+
114
+ **Installing via FTP**
115
+
116
+ Login to your hosting space via an FTP software, e.g. FileZilla.
117
+ Unzip the downloaded Slider by 10Web plugin folder without making any changes to the folder.
118
+ Upload the Slider by 10Web plugin into the following location wp-content>wp-plugins.
119
+ Login to the WordPress Administrator Panel.
120
+ Activate Slider by 10Web by going to Plugins and pressing Activate button.
121
+
122
+ If any problem occurs with installation of Slider by 10Web, [please let us know](https://10web.io/contact-us/).
123
+
124
+ == Frequently Asked Questions ==
125
+
126
+ = What can I achieve with Slider by 10Web plugin? =
127
+
128
+ WordPress Slider plugin is a user-friendly tool which helps you create unlimited responsive sliders for your website.
129
+
130
+ It lets you add images, videos, posts and other media as slides or layers. Configure the numerous useful options and showcase your slider on a WordPress **page, post, widget area** or a **custom PHP** template.
131
+
132
+ Include **YouTube, Vimeo,** as well as **self-hosted** videos to your slideshow with just a few clicks. Video autoplay feature of Slider plugin lets you provide a modern user interface for the visitors of your website.
133
+
134
+ Enrich the display of your slides with **6 amazing layer features,** such as text, image and video layers, other media, social buttons, and hotspots. WordPress Slider plugin provides various aesthetic **transition effects** for slides and layers, letting you advance your slideshow to a whole new level.
135
+
136
+ Using this WordPress Slider plugin, you can turn your slideshow into **a posts slider** using your website posts. Furthermore, you can create an interactive slideshow by linking any slide to an internal or external web page.
137
+
138
+ Powered by modern technology, WordPress Slider plugin will help you build amazing sliders without having to code a single line. You can create the following types of CSS3 slider with wonderful autoplay feature:
139
+
140
+ * cycle slider,
141
+ * free video slideshow (specifically TouTube slideshow and vimeo slideshow),
142
+ * product carousel,
143
+ * Javascript slideshow,
144
+ * photo slideshow,
145
+ * testimonial slider,
146
+ * content slideshow,
147
+ * simple image rotator,
148
+ * video gallery and more.
149
+
150
+ You can display images slider with different elegant animations. This slideshow plugin allows you to display your portfolio images, videos in a modern slider gallery.
151
+
152
+ The options to create these slideshows are infinite. For instance, if you wish to create a simple PDF slider, you can use text layers and image layers on a white background image, and thus showcase your content slider in a PDF-like style.
153
+
154
+ Or, you can turn the slider into a Woocommerce slider by adding links to Woocommerce product pages.
155
+
156
+ = How can I add images to slider? =
157
+
158
+ Press **Add Slides** button below **Slider Title** to add an item to your banner rotator. You will access **WordPress Media Library,** which lets you use existing images or upload new media.
159
+
160
+ Upload the images and videos you wish to add or browse items from WordPress Media Library. You can select a single item by clicking on it, or choose multiple by pressing and holding **Shift** or **Control** keys on your keyboard.
161
+
162
+ After choosing the images and videos for your image carousel or cycle slider, press **Add to Slider** button.
163
+
164
+ When the slides are added, you will be able to see the list of their thumbnails which help you to easily navigate through slides. Each thumbnail has its own set of buttons, which will become visible after hovering on an item:
165
+
166
+ * **Edit.** You can change the slide image, keeping its attributes (e.g. layers on slides, transitions).
167
+ * **Copy.** Pressing this button will create a duplicate of the current slide. The duplicate will be added as the last slide of your slideshow.
168
+ * **Delete.** You can delete the slide using this button.
169
+
170
+ Furthermore, you are able to change the ordering of the slides by dragging the thumbnails and repositioning them.
171
+
172
+ Make sure to **Publish/Update** your slideshow to keep the changes you made. You can also **Preview** the slider to check its appearance.
173
+
174
+ **Adding Images from URL**
175
+
176
+ In addition to uploading, embedding items and using WordPress posts, WordPress Slider plugin allows to insert images using their absolute links. To do this, press **Add Slides** button and navigate to **Insert from URL** tab.
177
+
178
+ This section of the toolbox provides an input, where you just need to add the absolute URL of an image. The link needs to have the following structure:
179
+
180
+ *https://example.com/complete-file-path/image.jpg*
181
+
182
+ After providing the URL of the slide image, click **Add to Slider** button.
183
+
184
+ **Using WD Media Uploader**
185
+
186
+ Besides using default Media Library, WordPress Slider plugin has an advanced WD Uploader for adding or editing slides. This is a powerful and user-friendly tool which allows you to upload and manage images, separate them into folders, and more.
187
+
188
+ To access WD Uploader, firstly, you need to enable it from **Global Options** of Slider by 10Web plugin. Go to **Slider by 10Web > Options** page and set **Enable WD Media Uploader** setting to **Yes.**
189
+
190
+ Afterwards, edit your slideshow and click on **Add Slides** button. Navigate to WD Media Uploader tab to start adding new images. This dashboard includes a set of options which we will describe one by one.
191
+
192
+ = Can I add video slides to slider? =
193
+
194
+ Slider by 10Web plugin also lets you embed media from various platforms, such as **YouTube** and **Vimeo.** To use this feature, press **Add Slides** button then click on **Embed Media** tab. Use the input bar above to add the **URL** of the image or video you wish to add, then press **Add to slider** button.
195
+
196
+ You can import items from the following websites:
197
+ * YouTube,
198
+ * Vimeo,
199
+ * Instagram,
200
+ * Flickr,
201
+ * Dailymotion.
202
+
203
+ For instance, when adding a YouTube video as a slideshow item, you just need to provide its link.
204
+
205
+ This lets you create a modern-looking fullscreen slider with videos, that showcase your products, business or services.
206
+
207
+ = Is it possible to make custom style changes to a slide? =
208
+
209
+ Use **CSS** tab of **Slider Settings** to write additional CSS code and apply custom styles to the slider. Note, that these changes will override the original styles of the slider.
210
+
211
+ Also, you can edit its **Settings** by enabling different attributes and configuring corresponding features. For instance, you can enable slide vertical animation effect and turn your slideshow into a vertical slider.
212
+
213
+ These vertical slides look especially nice, when you are displaying professional photographs. However, you are able to use all slide effects both on images and videos.
214
+
215
+ = Can I publish slider as a widget? =
216
+
217
+ To publish your slideshow on a widget area, navigate to Appearance > Widgets page. All widgets on your website and widget areas provided by your theme are available on this dashboard.
218
+
219
+ Look for Slider by 10Web widget, then drag it to the widget area where you wish to display the slideshow. Write a Title for the widget and choose any slideshow using Select Slider drop-down menu. Press Save and the slider will appear on this widget area immediately.
220
+
221
+ = How can I add layers to slides? =
222
+
223
+ WordPress slider plugin provides powerful layer options, which help you enhance the display of your slideshow. This section of Slider by 10Web user guide will help you add them to your slides and fully customize them.
224
+
225
+ The plugin is tuned up with the following types of layers, which can be added to each slide multiple times:
226
+
227
+ * **Text,** allowing you to display a **text block** on your slides,
228
+ * **Image,** which lets you place an **image layer** over the slide background image,
229
+ * **Video,** which you can use to add a **self-hosted video** on the slide,
230
+ * **Media Embed,** that adds **Youtube, Vimeo, Instagram, Flickr,** and **Dailymotion** media as slide layer,
231
+ * **Social Buttons,** letting you place **Facebook, Google+, Twitter, Pinterest,** and **Tumblr** share buttons on your slides,
232
+ * **Hotspot,** which adds an **animating spot** to slide. It displays additional text, when users hover the hotspot, and you can also add an onclick link to it.
233
+
234
+ Click on a slide you wish to edit, and the layer buttons will appear under the main image. Press the one you wish to add to the selected slide, and let's begin customizing its settings.
235
+
236
+ After a layer is added, a new toolbox becomes available, providing various customization options. Using the top bar, you can:
237
+ * reorder the layer using drag-and-drop feature,
238
+ * edit the title of the layer,
239
+ * delete or copy it,
240
+ * change its order number.
241
+
242
+ Click on the gray bar to expand and edit all options of the layer. This section of user-friendly tools allows to fully personalize each layer. You are able to implement modifications such as:
243
+
244
+ * specify the dimensions of layers,
245
+ * set their positions on slides,
246
+ * configure slide in and slide out animations effects,
247
+ * modify their color, font style, transparency,
248
+ * add unique classes for layers,
249
+ * set links on each layer,
250
+ * configure various on-click actions, such as playing/pausing slideshow,
251
+ and much more.
252
+
253
+ It is important to note, that Slider by 10Web plugin also allows you to reposition layers by dragging them around on the slide itself.
254
+
255
+ = Can I move sliders from one site to another? =
256
+
257
+ To save lots of time, WordPress slider plugin provides its **Import/Export** feature, letting you move created sliders from one site to another. With just a few clicks, you can have all slideshows uploaded and built on your second website.
258
+
259
+ Prior to transferring the sliders, make sure to install Slider by 10Web to the destination site. Let's begin discussing exporting and importing options.
260
+
261
+ **Exporting Sliders**
262
+
263
+ Navigate to **Slider by 10Web > Sliders** page to export slideshows. Mark the sliders you would like to export, then select **Export** option from **Bulk Actions.** Afterwards, press **Apply** button and sliders will start downloading immediately.
264
+
265
+ You can choose to transfer the slider with images and settings, or alternatively, just export the settings and add your own slides afterwards.
266
+
267
+ **Importing Sliders**
268
+
269
+ To import the downloaded sliders, go to **Slider by 10Web > Import** page first. Use **Choose File** button to browse the exported slider. Select the file, afterwards, click **Import** button. The slider will be added automatically.
270
+
271
+ You can also import slideshows from Demo site and import them to your website. Just press the **Download** button below each slider, and follow the steps described above.
272
+
273
+ = How do I insert the WordPress Slider into a Page or a Post? =
274
+
275
+ To insert your slider into a page or post, add or edit the post/page where you wish to showcase the slideshow. Above the content editor, there is a button titled **Add Slider by 10Web.** All you need to do is to press this button, choose a slideshow using **Select a Slider** drop-down menu, then click **Insert.**
276
+
277
+ The shortcode of your slideshow, e.g. [wds id="2"], will be added to the content of the page/post you are editing.
278
+
279
+ In addition, you can add the shortcode manually by copying it from **Slider by 10Web > Sliders** page. Each slider shortcode is displayed next to the corresponding item, under **Shortcode** column.
280
+
281
+ = Can I customize Slider settings to better fit my needs? =
282
+
283
+ WordPress Slider plugin comes with a set of useful options which allow you to customize each slideshow independently. Having configured slideshows separately, you can publish multiple sliders on your website, each with its own unique design and purpose.
284
+
285
+ Navigate to **Settings** tab of your slider to begin configuring its options.
286
+
287
+ This toolbox consists of the following sections, each providing its own pack of user-friendly options.
288
+
289
+ **Global**
290
+
291
+ **Global** tab of **Slider Settings** includes general options for the slider. You can personalize the way your slider behaves and shows. You can:
292
+ * modify its display type and dimensions,
293
+ * set animation effect and its duration,
294
+ * specify slider looping and shuffling settings,
295
+ * change slideshow behavior on desktop and mobile devices,
296
+ * set music to play along with the slider,
297
+ * enable parallax effect for the slider, and much more.
298
+
299
+ **Carousel**
300
+
301
+ Have your slideshow appearing in Carousel mode by activating it from **Carousel** tab of **Slider Settings.** With these options, you can personalize the display of your slider carousel. You are able to:
302
+ * change the number of images shown on carousel,
303
+ * set the ratio of carousel image dimensions (width divided by height),
304
+ * edit the styles of carousel background image, and more.
305
+
306
+ **Navigation**
307
+
308
+ Completely customize the way your slider navigates using the tools provided in **Navigation** section of **Slider Settings.** You are able to switch on:
309
+ * mouse-click navigation (Next/Previous buttons),
310
+ * mouse-swipe and mouse-wheel navigation,
311
+ * touch-swipe navigation on mobile devices,
312
+ * keyboard navigation with next/previous keys,
313
+ * on-slider Play / Pause buttons,
314
+ * as well as activate navigation buttons for your slider and style every attribute as you wish.
315
+
316
+ **Bullets**
317
+
318
+ Place **bullets** on your slider by activating them from this section. This feature lets users to easily navigate from one slide to another in a random sequence. This set of options lets you:
319
+ * select to show bullets on hover or always,
320
+ * set the position of slider bullets,
321
+ * choose color, size and margin for them,
322
+ * customize the bullets by uploading your own images, and more.
323
+
324
+ **Filmstrip**
325
+
326
+ Display a nifty **filmstrip** of slide thumbnails along with your slider. This is a neat way to showcase miniatures of your slides before users click to view their larger versions. You can customize the filmstrip by:
327
+ * changing its position on the slider,
328
+ * setting background color and inactive thumbnail transparency,
329
+ * specify thumbnail dimensions and separator size,
330
+ * customize the border of the active thumbnail.
331
+
332
+ **Timer bar**
333
+
334
+ Activating **Timer bar** lets you have a neat loading bar with each slide. The loading bar starts every time a slide displays, and ends when the slideshow switches to the next image during autoplay.
335
+
336
+ You can customize the type of the Timer bar, as well as its size, color and transparency.
337
+
338
+ **Watermark**
339
+
340
+ You are able to add watermark to the main images of your slider with the options Watermark section provides. Choose the type of the watermark, text or image, then configure settings such as:
341
+ * providing watermark text or image URL,
342
+ * specifying font size, font style and color of watermark text.
343
+ * setting the size of the watermark image, and select the position of the watermark.
344
+ * Press Set Watermark to add the watermark text or image to main images of your slider. To remove it, simply click on Reset Watermark button.
345
+
346
+ = Can I use Slider by 10Web to create different sliders for different pages? =
347
+
348
+ Yes, you can create unlimited number of sliders with unlimited amount of slides. Then you may paste corresponding slider code within each page.The slider shortcodes are listed next to the slider in **Slider by 10Web > Slider** section.
349
+
350
+ = Can I add a slider into a custom PHP template of my website theme? =
351
+
352
+ In case you use custom PHP templates and would like to display your slideshow on these pages, you can use **PHP function** Slider by 10Web plugin provides. You just need to add the function, e.g.:
353
+
354
+ *<?php if (function_exists('wd_slider'))
355
+ {
356
+ wd_slider(2);
357
+ }
358
+ ?>*
359
+
360
+ into the necessary .php file. For instance, if you wish to display the slideshow along with the header, simply add the code to header.php file of your website theme. You can find the function and copy it from **Slider by 10Web > Sliders** page, under **PHP function** column.
361
+
362
+ = Is it possible to add watermark to slider images? =
363
+
364
+ You are able to add watermark to the main images of your slider with the options **Slider Settings > Watermark** section provides. Choose the type of the watermark, **text** or **image,** then configure settings such as:
365
+
366
+ * providing watermark **text** or **image URL,**
367
+ * specifying **font size, font style** and **color** of watermark text.
368
+ * setting the **size** of the watermark image,
369
+ * and select the **position** of the watermark.
370
+
371
+ Press **Set Watermark** to add the watermark text or image to main images of your slider. To remove it, simply click on Reset Watermark button.
372
+
373
+ = Does Slider by 10Web support Google fonts? =
374
+
375
+ Slider by 10Web does support Google Fonts. This allows you to custom text layer over slides using the provided big variety of Google Fonts.
376
+
377
+ You can change the fonts of a layer by editing it. Look for **Font family** option to enable **Google Fonts,** then select the font family you wish to use.
378
+
379
+ = What are the most common applications of this wordpress responsive plugin? =
380
+
381
+ This free slider plugin can be used for showcasing your portfoliow with the help of:
382
+ * Image slider,
383
+ * video slider (specifically vimeo slider, youtube slider, HTML5 slider),
384
+ * post slider,
385
+ * product slider,
386
+ * photo slider / gallery slider,
387
+ * carousel slider and more.
388
+
389
+ Thes content slider options are the most commonly used applications of the best slider plugin, but those can be expanded to meet the needs. You can combine images into multi-layer content with videos and carousel slideshow effect or display video layers.
390
+
391
+ = Is this a good plugin for creating a post slider? =
392
+
393
+ The plugin allows embedding WordPress posts making it a great WordPress Posts slider with various functionality and content slideshow. This is also useful in case you wish to have a product slider. You can add your products as posts and display them on your slideshow.
394
+
395
+ Moreover, it can be turned into custom post types slider or a content slider with various layers, images and animations. This will help to create product carousel/image carousel with ecommerce plugins or photo slideshow with gallery plugin and even more.
396
+
397
+ The good part of this is that you can have a text slider with its picture slide, while keeping up with responsive post slider if compared with other post slider or banner slider plugins. This image slideshow plugin has all the necessary features for creating various kinds of wonderful CSS3 slider.
398
+
399
+ = Can I post links on slider images using this slider plugin? =
400
+
401
+ You can post a redirection link on the image, allowing the user to get to the mentioned post or page upon clicking on the slide. Please note, that with this WordPress responsive slider plugin, you need to use *http://* and *https://* for external links.
402
+
403
+ = Why is my watermark not showing on image? =
404
+ Watermark may not work because of the following reasons:
405
+
406
+ * If you add slider images by embedding them from an external link,
407
+ * If your GD2 library is switched off on your server,
408
+ * If the image you have uploaded is larger than the slider dimensions you have set in settings.
409
+ The last point means that if you have placed the watermark on the angles of the image, it will not be visible because the slider image will be cut off.
410
+
411
+ So, please try the following:
412
+ * Make sure to upload images in slider plugin, instead of embedding it from an external URL,
413
+ * make sure to have your server’s GD2 library on,
414
+ * resize the slideshow images and set the same dimensions as in **Slider Settings** before uploading.
415
+
416
+ If you post a watermark on the slider plugin and it does not appear on the image, you can check the watermark position firstly. Please open **Slide Options** section, and use **Fillmode** to change the appearance of the slide background. By changing the fillmode option, you can see in which mode the watermark looks good on WordPress responsive slider images.
417
+
418
+ = Can I post social media buttons to slides using WordPress responsive slider ? =
419
+ Premium version of Slider by 10Web plugin allows you to place social media layers. Under each image of your slider, you’ll see **Add Social Media Button Layer** button.
420
+
421
+ Press it to add to your slide. You also are able to customize these buttons using layer settings.
422
+
423
+ = Can I add custom navigation buttons? =
424
+
425
+ You can add your own custom navigation images instead of buttons in WordPress responsive slider plugin. You can also manage default buttons by customizing sizes, colors, border and background colors.
426
+
427
+ To add custom buttons in slider plugin please enter **Settings > Navigation** section and find **Image for next / previous buttons.** Select **Custom** and upload images for each button.
428
+
429
+ = Does WordPress responsive slider allow to post the same layer on different images? =
430
+
431
+ Slider plugin lets you use the same text layer, image layer, video layer for all slider images. After adding the layer, you can mark the **Static layer** option and the layer will be visible on all slides.
432
+
433
+ = Does slider plugin take the full width if I post it as a widget? =
434
+ The plugin takes the full width of the widget area if the **Boxed Layout** in **Slider Settings** is checked. Please note that the option you can find in the **Global Options** section, rather than in the widget settings.
435
+
436
+ == Screenshots ==
437
+ 1. Slider by 10Web - Slider 1
438
+ 2. Slider by 10Web - Slider 2
439
+ 3. Slider by 10Web - Slider 3
440
+ 4. Slider by 10Web - Slider 4
441
+ 5. Slider by 10Web - Edit Slider
442
+ 6. Slider by 10Web - Settings
443
+ 7. Slider by 10Web - Global Options
444
+
445
+
446
+ == Changelog ==
447
+
448
+
449
+ = 1.2.27 =
450
+ * Fixed: Video slide Video loop.
451
+ * Updated: jQuery upload library.
452
+
453
+ = 1.2.26 =
454
+ * Added: Slider edit links for Elementor widget.
455
+
456
+ = 1.2.25 =
457
+ * Fixed: Newly added slider preview image.
458
+ * Fixed: Leave page message for newly published slider.
459
+ * Removed: Google+.
460
+ * Fixed: Some settings in Options do not work.
461
+ * Fixed: PHP Notices from Slider in log file.
462
+
463
+ = 1.2.24 =
464
+ * Added: Banner to install 10Web manager.
465
+
466
+ = 1.2.23 =
467
+ * Fixed: Security issue.
468
+
469
+ = 1.2.21 =
470
+ * Changed: PHP function shortcode check if function exists.
471
+ * Fixed: Do not print js before DOCTYPE.
472
+ * Fixed: Error when clicking allow or skip to collect some usage data more then once.
473
+
474
+ = 1.2.20 =
475
+ * Added: Message during import for PHP XML and ZipArchive PHP extensions.
476
+ * Added: The Separate section for 10Web Plugins in Elementor.
477
+ * Fixed: Add Layer click action.
478
+ * Changed: User guide links.
479
+ * Changed: Analytics trackable links.
480
+
481
+ = 1.2.19 =
482
+ * Fixed: WD library.
483
+
484
+ = 1.2.18 =
485
+ * Added: Elementor widget.
486
+
487
+ = 1.2.17 =
488
+ * Fixed: Bug on restarting slider.
489
+ * Fixed: Smart crop functionality.
490
+ * Updated: Free users library.
491
+
492
+ = 1.2.16 =
493
+ * Fixed: Rendering in Elementor builder.
494
+ * Changed: Navigation buttons showing delay on hover.
495
+ * Changed: Links to 10Web.io.
496
+ * Changed: Demo slider download buttons and images.
497
+
498
+ = 1.2.14 =
499
+ * Fixed: Add shortcode functionality on Beaver, Elementor, SiteOrigin and Visual Composer builders.
500
+ * Fixed: Set/Reset watermark functionality.
501
+ * Fixed: Conflict with Fast Velocity Minify plugin with minified js.
502
+
503
+ = 1.2.13 =
504
+ * Fixed: Text layer fixed step position.
505
+ * Fixed: Bug on slider preview.
506
+ * Fixed: Slider autoplay with multiple sliders on one page.
507
+ * Changed: Video autoplay on some browsers.
508
+
509
+ = 1.2.12 =
510
+ * Changed: Separate buttons for deactivation.
511
+
512
+ = 1.2.11 =
513
+ * Fixed: Callback functionality.
514
+ * Added: GDPR compliance (Privacy suggestion text).
515
+ * Fixed: Bug on circle timer.
516
+
517
+ = 1.2.10 =
518
+ * Updated: WD Library (added GDPR Compliance).
519
+
520
+ = 1.2.9 =
521
+ * Fixed: Rapid movement of slider.
522
+ * Added: Gutenberg integration.
523
+
524
+ = 1.2.8 =
525
+ * Fixed: Layer effect in animation in some case.
526
+
527
+ = 1.2.7 =
528
+ * Fixed: Minor bug depend on PHP version.
529
+
530
+ = 1.2.6 =
531
+ * Changed: Main PHP file structure.
532
+ * Changed: GET variable in slider edit page.
533
+ * Fixed: Keyboard, Mouse swipe, Touch swipe navigation.
534
+
535
+ = 1.2.5 =
536
+ * Added: Insert slide image from URL.
537
+ * Fixed: Full width slider height.
538
+ * Fixed: Bug on PHP 7.2.0 version.
539
+ * Changed: Overview page.
540
+
541
+ = 1.2.4 =
542
+ * Removed: Notification
543
+
544
+ = 1.2.3 =
545
+ * Fixed: Some js and css conflicts with other plugins and builders.
546
+ * Fixed: Install Demo slides.
547
+ * Changed: Overview page.
548
+
549
+ = 1.2.2 =
550
+ * Added: Background fill mode for slide.
551
+ * Added: Auto height functionality for full width slider.
552
+ * Added: Option to stretch slider to fill parent container.
553
+ * Fixed: Video layer autoplay bug.
554
+
555
+ = 1.2.1 =
556
+ * Changed: Deactivation popup.
557
+
558
+ = 1.2.0 =
559
+ * Changed: Improved user interface of sliders.
560
+ * Fixed: Reset settings.
561
+ * Fixed: Import slider on Windows servers.
562
+ * Added: Support forum and Review links.
563
+
564
+ = 1.1.92 =
565
+ * Added: Show notification to install Image Optimizer WD plugin on plugin pages.
566
+
567
+ = 1.1.91 =
568
+ * Changed: Show notification to install Backup WD plugin only on plugin pages.
569
+
570
+ = 1.1.90 =
571
+ * Removed: Popup to install Backup WD plugin.
572
+
573
+ = 1.1.89 =
574
+ * Added: Show popup notice to install Backup WD plugin.
575
+
576
+ = 1.1.88 =
577
+ * Fixed: Overview page conflict.
578
+ * Fixed: Conflict with Jetpack Contact Form module.
579
+
580
+ = 1.1.87 =
581
+ * Fixed: Updated library to prevent conflict with PHP version 7.
582
+
583
+ = 1.1.86 =
584
+ * Improved: Audio file validation.
585
+
586
+ = 1.1.85 =
587
+ * Fixed: Do not insert a shortcode if no slider is selected.
588
+
589
+ = 1.1.84 =
590
+ * Improved: Translatable backend
591
+ * Improved: Compatibility with jQurey 3.2.1
592
+
593
+ = 1.1.83 =
594
+ * Fixed: HTML attribute validation.
595
+
596
+ = 1.1.82 =
597
+ * Fixed: Security issue in filemanager.
598
+
599
+ = 1.1.81 =
600
+ * Fixed: Uninstall.
601
+ * Fixed: Youtube video autoplay in some case.
602
+
603
+ = 1.1.80 =
604
+ * Fixed: Slider direction with two slides.
605
+
606
+ = 1.1.79 =
607
+ * Changed: Minimum font size validation.
608
+
609
+ = 1.1.78 =
610
+ * Added: Apply layer global options to existing layers.
611
+ * Changed: Removed support forum link.
612
+
613
+ = 1.1.77 =
614
+ * Added: Minimum font size for text layers
615
+
616
+ = 1.1.76 =
617
+ * Added: Support forum link.
618
+
619
+ = 1.1.75 =
620
+ * Improved: Fonts.
621
+
622
+ = 1.1.74 =
623
+ * Added: Default options for layers.
624
+ * Added: Overview page.
625
+ * Fixed: Google fonts bug.
626
+
627
+ = 1.1.73 =
628
+ * Fixed: Deleting newly added slides and layers.
629
+ * Fixed: Slider height with horizontal filmstrip.
630
+ * Fixed: Share slides.
631
+ * Fixed: Scroll load.
632
+ * Fixed: Video slide and layer poster in backend.
633
+ * Fixed: Image thumbnail in backend with single quote in name.
634
+
635
+ = 1.1.72 =
636
+ * Fixed: Warrning in admin popups.
637
+ * Fixed: Required field validation.
638
+ * Changed: Scroll load in filemanager.
639
+
640
+ = 1.1.71 =
641
+ * Fixed: Save as copy.
642
+
643
+ = 1.1.70 =
644
+ * Added: Slides order direction (optional).
645
+ * Fixed: Filemanager allowed file types.
646
+ * Fixed: Zoomfade effect.
647
+
648
+ = 1.1.69 =
649
+ * Fixed: Transition effect bug.
650
+
651
+ = 1.1.68 =
652
+ * Added: Animation iteration count.
653
+ * Fixed: Sliders import.
654
+
655
+ = 1.1.67 =
656
+ * Added: Full width slider on small screens.
657
+
658
+ = 1.1.66 =
659
+ * Fixed: Sanitize folder names in filemanager.
660
+
661
+ = 1.1.65 =
662
+ * Fixed: Fixed background videos.
663
+ * Changed: "Select slider to use settings from" option on sliders merge.
664
+
665
+ = 1.1.64 =
666
+ * Fixed: Upload only images zip.
667
+ * Fixed: Removed empty line breaks from inline javascipt to prevent conflict with some themes.
668
+ * Fixed: Zoom Fade effect on Google Chrome browser.
669
+
670
+ = 1.1.63 =
671
+ * Fixed: New line in text layer.
672
+ * Fixed: Carousel view.
673
+
674
+ = 1.1.62 =
675
+ * Added: Static layers.
676
+
677
+ = 1.1.61 =
678
+ * Added: Alignment for text layer.
679
+
680
+ = 1.1.60 =
681
+ * Added: Two way slideshow. Slideshow can go backwards if someone switch to a previous slide.
682
+
683
+ = 1.1.59 =
684
+ * Changed: UploadHandler class name to prevent conflict with some themes.
685
+ * Fixed: Layer styles conflict with some themes.
686
+ * Changed: Dutch translations by Piet Kok.
687
+
688
+
689
+ = 1.1.58 =
690
+ * Added: Link to slide.
691
+ * Fixed: Click action for carousel view.
692
+
693
+ = 1.1.57 =
694
+ * Added: Possibility to change loading icon.
695
+
696
+ = 1.1.56 =
697
+ * Fixed: Slider with fixed background.
698
+ * Fixed: Buttons styles in backend.
699
+
700
+ = 1.1.55 =
701
+ * Added: Merge sliders.
702
+ * Fixed: Double quotes in custom javascript.
703
+
704
+ = 1.1.54 =
705
+ * Fixed: Layer RotatInDownRight effect saving.
706
+
707
+ = 1.1.53 =
708
+ * Fixed: Slider add new button under the message.
709
+
710
+ = 1.1.52 =
711
+ * Added: Option to hide slider on mobile.
712
+
713
+ = 1.1.51 =
714
+ * Fixed: Active thumbnail in carousel view.
715
+ * Changed: Loading gif.
716
+
717
+ = 1.1.50 =
718
+ * Changed: Featured themes page.
719
+
720
+ = 1.1.49 =
721
+ * Added: Text layer alignment option.
722
+
723
+ = 1.1.48 =
724
+ * Fixed: Preview popup.
725
+ * Fixed: Add posts popup styles.
726
+ * Fixed: Loading in filemanager.
727
+ * Fixed: Resetting layer positions on parallax sliders on touch leave.
728
+
729
+ = 1.1.47 =
730
+ * Fixed: Case sensitive search by name in Filemanager bug.
731
+ * Changed: Show last uploaded files as first in Filemanager.
732
+ * Changed: File manager design.
733
+ * Fixed: Sliders duplicate.
734
+
735
+ = 1.1.46 =
736
+ * Changed: Updated Font Awesome to 4.6.3 version.
737
+ * Fixed: Slider margin responsiveness.
738
+ * Fixed: Effect processing direction for slider with two slides.
739
+
740
+ = 1.1.45 =
741
+ * Added: Option whether include scripts only on necessary pages or no.
742
+
743
+ = 1.1.44 =
744
+ * Fixed: Conflict with "Yoast SEO" plugin.
745
+ * Fixed: Case sensitive search by name in Filemanager bug.
746
+ * Changed: Show last uploaded files as first in Filemanager.
747
+
748
+ = 1.1.43 =
749
+ * Changed: Support for new version of Google Fonts.
750
+
751
+ = 1.1.42 =
752
+ * Fixed: Interval for checking for updates.
753
+ * Fixed: Parallax effect on mobile.
754
+ * Fixed: Video autoplay bug.
755
+ * Changed: Featured plugins page.
756
+
757
+ = 1.1.41 =
758
+ * Added: Hover color for text layer
759
+
760
+ = 1.1.40 =
761
+ * Fixed: Link the slide in carousel view.
762
+ * Fixed: Specialchars in text layer.
763
+ * Changed: Slider bulk actions.
764
+
765
+ = 1.1.39 =
766
+ * Fixed: Minor bugs.
767
+ * Changed: Do not change the slide until slide loads.
768
+ * Fixed: Instagram slides.
769
+ * Fixed: Embed media by YouTube short url.
770
+
771
+ = 1.1.38 =
772
+ * Fixed: Slider display bug after previous update.
773
+
774
+ = 1.1.37 =
775
+ * Changed: Add scripts and styles only on pages where necessary.
776
+
777
+ = 1.1.36 =
778
+ * Changed: Save relative urls in database instead of absolute urls.
779
+
780
+ = 1.1.35 =
781
+ * Fixed: Save slider with big amount of slides.
782
+ * Fixed: Sliders pagination styles.
783
+ * Fixed: Vimeo autoplay.
784
+
785
+ = 1.1.34 =
786
+ * Added: No sliders found message.
787
+ * Fixed: Add images on new slider.
788
+ * Fixed: Duplicate sliders.
789
+ * Fixed: Add posts page styles.
790
+
791
+ = 1.1.33 =
792
+ * Added: Function with sliders return value.
793
+ * Changed: Featured plugins page.
794
+
795
+ = 1.1.32 =
796
+ * Fixed: Conflict with "Wordfence Security" plugin.
797
+ * Added: Hotspot text on click/hover(optional).
798
+
799
+ = 1.1.31 =
800
+ * Fixed: Add post page styles on Wordpress 4.5
801
+ * Fixed: Undefined iframes in frontend.
802
+ * Fixed: Filmstrip responsiveness.
803
+
804
+ = 1.1.30 =
805
+ * Changed: Add font-family without saving whole slider.
806
+
807
+ = 1.1.29 =
808
+ * Added: Text, image, hotspot layers click actions.
809
+
810
+ = 1.1.28 =
811
+ * Added: Slider loop option.
812
+ * Changed: Featured plugins, themes page.
813
+
814
+ = 1.1.27 =
815
+ * Added: Possibility to add font family to google fonts.
816
+
817
+ = 1.1.25 =
818
+ * Fixed: Slider by 10Web media uploader files with withespaces in name.
819
+ * Added: Option for hotspot animation.
820
+ * Added: Video loop and related video options.
821
+
822
+ = 1.1.24 =
823
+ * Updated: Google fonts list.
824
+
825
+ = 1.1.23 =
826
+ * Fixed: Bug in layer effect
827
+
828
+ = 1.1.22 =
829
+ * Changed: Some guidelines.
830
+
831
+ = 1.1.21 =
832
+ * Added: Google fonts scripts (greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic).
833
+ * Changed: Featured plugins and themes pages.
834
+
835
+ = 1.1.20 =
836
+ * Added: Possibility to add class to layers.
837
+
838
+ = 1.1.19 =
839
+ * Fixed: Conflict with some themes.
840
+ * Fixed: Dutch in translation (Thanks to Hielke Brandsma).
841
+
842
+ = 1.1.18 =
843
+ * Improved: Filemanager load time.
844
+
845
+ = 1.1.17 =
846
+ * Fixed: Newly added parameters on duplicate.
847
+
848
+ = 1.1.16 =
849
+ * Changed: User Manual links.
850
+ * Fixed: Vimeo embed videos pause bug on slide change.
851
+
852
+
853
+ = 1.1.15 =
854
+ * Fixed: Slider autoplay duration depend on Youtube video duraton.
855
+ * Fixed: Text bullets activate color.
856
+
857
+ = 1.1.14 =
858
+ * Added: Slide names as bullets.
859
+
860
+ = 1.1.13 =
861
+ * Fixed: Shortcode in custom container.
862
+
863
+ = 1.1.12 =
864
+ * Fixed: Verify nonce on embed media.
865
+ * Added: Carousel background image angle, grayscale, transparency options.
866
+
867
+ = 1.1.11 =
868
+ * Added: New year promo notice
869
+
870
+ = 1.1.10 =
871
+ * Fixed: Filemanager vulnerability. Thanks to Mika Epstein.
872
+
873
+ = 1.1.9 =
874
+ * Fixed: Licensing page.
875
+ * Fixed: Plugin direction for icons.
876
+ * Changed: Featured themes page.
877
+
878
+ = 1.1.8 =
879
+ * Fixed: Slider callback page responsiveness.
880
+ * Fixed: Keyboard navigation blocks spacebar.
881
+
882
+ = 1.1.7 =
883
+ * Added: Slider callback.
884
+ * Fixed: Styles for Wordpress 4.4.
885
+ * Fixed: Slider on Firefox.
886
+
887
+ = 1.1.6 =
888
+ * Fixed: HTML validation.
889
+
890
+ = 1.1.5 =
891
+ * Changed: Featured plugins page.
892
+
893
+ = 1.1.4 =
894
+ * Fixed: File manager styles.
895
+ * Fixed: Stay on current tab after save.
896
+
897
+ = 1.1.3 =
898
+ * Fixed: Shortcode puts in html tags for some themes.
899
+ * Changed: Enlarge title container in admin.
900
+ * Changed: Add slide button.
901
+ * Fixed: Carousel load.
902
+
903
+ = 1.1.2 =
904
+ * Added: Smart crop.
905
+
906
+ = 1.1.1 =
907
+ * Fixed: Backend styles.
908
+ * Fixed: Check all in add post popup.
909
+
910
+ = 1.1.0 =
911
+ * Changed: Backend design.
912
+ * Changed: Responsive backend.
913
+
914
+ = 1.0.50 =
915
+ * Fixed: Border sizing problem with image wrap.
916
+
917
+ = 1.0.49 =
918
+ * Added: Shortcode support in text layers.
919
+
920
+ = 1.0.48 =
921
+ * Fixed: Controll buttons in sites with different site and admin urls.
922
+
923
+ = 1.0.47 =
924
+ * Added: Fixed background slider.
925
+
926
+ = 1.0.46 =
927
+ * Changed: Default uploader.
928
+
929
+ = 1.0.45 =
930
+ * Changed: Demo Sliders.
931
+
932
+ = 1.0.44 =
933
+ * Fixed: Video sliders export without videos and thumbnails.
934
+ * Fixed: Single quote in css.
935
+ * Changed: Loading styles.
936
+
937
+ = 1.0.43 =
938
+ * Added: Show thumbnail on bullets hover.
939
+ * Fixed: First slide with single quotes in name.
940
+ * Fixed: Video slide/layer export/import with featured image.
941
+ * Fixed: Hide slider play /pause button on video slides.
942
+
943
+ = 1.0.42 =
944
+ * Added: Possibility to add font family.
945
+ * Fixed: "Link the slide to:" option save.
946
+ * Changed: No image, no video images.
947
+ * Changed: Notices show order.
948
+
949
+ = 1.0.41 =
950
+ * Added: Video slide/layer.
951
+ * Fixed: Line break in text, hotspot layer on export/import.
952
+
953
+ = 1.0.40 =
954
+ * Added: Swipe for filmstrip.
955
+ * Added: Mousewheel and keyboard navigation methods.
956
+ * Changed: Make touch navigation optional.
957
+
958
+ = 1.0.39 =
959
+ * Fixed: Flashing only on first transition during fade effect.
960
+
961
+ = 1.0.38 =
962
+ * Changed: Embed autoplay on slider autoplay.
963
+ * Fixed: Embed video poster.
964
+ * Changed: Featured plugins page.
965
+
966
+ = 1.0.37 =
967
+ * Added: Support/rate us messages.
968
+
969
+ = 1.0.36 =
970
+ * Changed: Filmstrip navigation arrows show on hover.
971
+
972
+ = 1.0.35 =
973
+ * Changed: Compability with Wordpress 4.3.
974
+ * Changed: Filmstrip separator.
975
+ * Changed: Message classes.
976
+
977
+ = 1.0.34 =
978
+ * Added: Google fonts.
979
+
980
+ = 1.0.33 =
981
+ * Added: Option to display bullets on hover.
982
+
983
+ = 1.0.32 =
984
+ * Added: Option for mouse swipe navigation.
985
+
986
+ = 1.0.30 =
987
+ * Fixed: Removed editor button from hotspot layer.
988
+ * Added: Demo sliders page.
989
+
990
+ = 1.0.29 =
991
+ * Fixed: Multiple sliders in a page.
992
+
993
+ = 1.0.28 =
994
+ * Fixed: Embed slide as first slide.
995
+ * Changed: Licensing page.
996
+
997
+ = 1.0.27 =
998
+ * New: Slider preview in admin.
999
+ * Changed: Improved slide load.
1000
+ * Fixed: Play/pause button.
1001
+
1002
+ = 1.0.26 =
1003
+ * New: Parallax effect.
1004
+
1005
+ = 1.0.25 =
1006
+ * Fixed: security issue.
1007
+ * Changed: Manage buttons position.
1008
+
1009
+ = 1.0.24 =
1010
+ * Changed: YouTube, Vimeo embed.
1011
+ * New: Instagram, Flickr and Dailymotion embed.
1012
+
1013
+ = 1.0.23 =
1014
+ * New: Hotspot layer (pro version).
1015
+
1016
+ = 1.2.22 =
1017
+ * New: Search by name in file manager.
1018
+
1019
+ = 1.0.21 =
1020
+ * Changed: Featured plugins page.
1021
+
1022
+ = 1.0.20 =
1023
+ * Fixed: Slider playback direction.
1024
+
1025
+ = 1.0.19 =
1026
+ * Fixed: Slider width/height problem after Chrome update.
1027
+ * Fixed: Export.
1028
+ * Fixed: Carousel slider with one slide.
1029
+
1030
+ = 1.0.18 =
1031
+ * Fixed: Conflict with some themes.
1032
+
1033
+ = 1.0.17 =
1034
+ * New: Slider Export/Import.
1035
+ * Fixed: Delete slides whitout layers on slider delete.
1036
+ * Fixed: Image change effect in carousel views whith one image.
1037
+ * Fixed: Removed "There is no slider selected or the slider was deleted." error message for unpublished sliders.
1038
+ * Fixed: Carousel view after Chrome update(23.05.15).
1039
+ * Fixed: Activate first slide tab after slider duplication.
1040
+ * Fixed: Active bullet and filmstrip thumbnail in carousel view.
1041
+
1042
+ = 1.0.16 =
1043
+ * Changed: Featured plugins page.
1044
+ * New: Featured themes page.
1045
+
1046
+ = 1.0.15 =
1047
+ * Change links.
1048
+
1049
+ = 1.0.14 =
1050
+ * Fixed: Disable enter key on text inputs.
1051
+ * New: Bulk add images by media uploader.
1052
+
1053
+ = 1.0.13 =
1054
+ * Fixed: Image layer alt.
1055
+ * Fixed: Word break in Chrome.
1056
+
1057
+ = 1.0.11 =
1058
+ * Fixed: Timer bar and bullets postion with horizontal filmstrip.
1059
+ * Fixed: Set watermark.
1060
+
1061
+ = 1.0.10 =
1062
+ * Fixed: Slide change direction from 9 to 10.
1063
+ * Fixed: Layers with "Start with slide" option.
1064
+
1065
+ = 1.0.9 =
1066
+ * Update licensing page
1067
+
1068
+ = 1.0.8 =
1069
+ * New: Start with slide option.
1070
+ * New: Effect duration option.
1071
+
1072
+ = 1.0.7 =
1073
+ * New: Circle timer.
1074
+ * New: Slider duplication.
1075
+ * Fixed: Disable swipe on navigation off.
1076
+ * Fixed: Layer click on 3D animations.
1077
+
1078
+ = 1.0.6 =
1079
+ * custom play/pause buttons
1080
+ * slide duplication
1081
+
1082
+ = 1.0.5 =
1083
+ * Image for Next / Previous buttons (Default, Custom, Styled)
1084
+ * Image for bullets (Default, Custom, Styled)
1085
+
1086
+ = 1.0.4 =
1087
+ * stop on hover option
1088
+ * slide, text layer, image layer link open in a new window option
1089
+
1090
+ = 1.0.3 =
1091
+ * single quota in image name (bug fixed)
1092
+
1093
+ = 1.0.2 =
1094
+
1095
+ * Turn SliderWD Media Upload
1096
+ * Ajax save
1097
+ * Images Bulk Add
1098
+ * Timer bar bug fixed
1099
+ * change shortcode button
1100
+ * fullwidth slider margin bug fixed
1101
+
1102
+ = 1.0.1 =
1103
+ * User manual links added.
1104
+
1105
+ = 1.0.0 =
1106
+ * Initial version.
1107
+
slider-wd.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Slider by 10Web
4
  * Plugin URI: https://10web.io/plugins/wordpress-slider/?utm_source=slider&utm_medium=free_plugin
5
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
6
- * Version: 1.2.26
7
  * Author: 10Web
8
  * Author URI: https://10web.io/pricing/?utm_source=slider&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -78,8 +78,8 @@ final class WDS {
78
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
79
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
80
  $this->main_file = plugin_basename(__FILE__);
81
- $this->plugin_version = '1.2.26';
82
- $this->db_version = '1.2.26';
83
  $this->prefix = 'wds';
84
  $this->nicename = __('Slider', $this->prefix);
85
  $this->use_home_url();
@@ -199,7 +199,6 @@ final class WDS {
199
  public function enqueue_elementor_widget_scripts() {
200
  wp_enqueue_script('wds_elementor_widget_js', $this->plugin_url . '/js/wds_elementor_widget.js', array('jquery'));
201
  }
202
-
203
  /**
204
  * Register widget for Elementor builder.
205
  */
3
  * Plugin Name: Slider by 10Web
4
  * Plugin URI: https://10web.io/plugins/wordpress-slider/?utm_source=slider&utm_medium=free_plugin
5
  * Description: This is a responsive plugin, which allows adding sliders to your posts/pages and to custom location. It uses large number of transition effects and supports various types of layers.
6
+ * Version: 1.2.27
7
  * Author: 10Web
8
  * Author URI: https://10web.io/pricing/?utm_source=slider&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
78
  $this->plugin_dir = WP_PLUGIN_DIR . "/" . plugin_basename(dirname(__FILE__));
79
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
80
  $this->main_file = plugin_basename(__FILE__);
81
+ $this->plugin_version = '1.2.27';
82
+ $this->db_version = '1.2.27';
83
  $this->prefix = 'wds';
84
  $this->nicename = __('Slider', $this->prefix);
85
  $this->use_home_url();
199
  public function enqueue_elementor_widget_scripts() {
200
  wp_enqueue_script('wds_elementor_widget_js', $this->plugin_url . '/js/wds_elementor_widget.js', array('jquery'));
201
  }
 
202
  /**
203
  * Register widget for Elementor builder.
204
  */