Commit 926b180d authored by Regis's avatar Regis
Browse files

Resolve "Refactor code"

parent e492bf8b
<!DOCTYPE html>
<html lang="fr">
<head>
<title>Conditions générales d'utilisation de VIKAZIMUT</title>
<link rel="icon" type="image/x-icon" href="https://vikazimut.vikazim.fr/public/images/icon.ico"/>
<meta charset="utf-8"/>
</head>
......
<!DOCTYPE html>
<html lang="en">
<head>
<title>General Conditions of Use of VIKAZIMUT</title>
<link rel="icon" type="image/x-icon" href="https://vikazimut.vikazim.fr/public/images/icon.ico"/>
<meta charset="utf-8"/>
</head>
......
build
components
node_modules
.DS_Store
.sass-cache
_site
_config.yaml
\ No newline at end of file
{
"files": [
{
"name": "src/dropzone.coffee",
"regexs": [
"Dropzone.version = \"###\""
]
},
{
"name": "dist/dropzone.js",
"regexs": [
"version = \"###\""
]
},
{
"name": "dist/min/dropzone.min.js",
"regexs": [
"version=\"###\""
]
},
{
"name": "dist/dropzone-amd-module.js",
"regexs": [
"version = \"###\""
]
},
{
"name": "dist/min/dropzone-amd-module.min.js",
"regexs": [
"version=\"###\""
]
},
{
"name": "package.json",
"regexs": [
"\"version\": \"###\""
]
},
{
"name": "component.json",
"regexs": [
"\"version\": \"###\""
]
},
{
"name": "bower.json",
"regexs": [
"\"version\": \"###\""
]
}
]
}
Contribute
==========
DO NOT CREATE PULL REQUESTS ON GITHUB!
I will simply close them. If you want to contribute, please use [gitlab.com](https://gitlab.com/meno/dropzone) instead.
\ No newline at end of file
License
(The MIT License)
Copyright (c) 2012 Matias Meno <m@tias.me>
Logo & Website Design (c) 2015 "1910" www.weare1910.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<img alt="Dropzone.js" src="http://www.dropzonejs.com/images/new-logo.svg" />
Dropzone.js is a light weight JavaScript library that turns an HTML element into a dropzone.
This means that a user can drag and drop a file onto it, and the file gets uploaded to the server via AJAX.
* * *
_If you want support, please use [stackoverflow](http://stackoverflow.com/) with the `dropzone.js` tag and not the
GitHub issues tracker. Only post an issue here if you think you discovered a bug or have a feature request._
* * *
**Please read the [contributing guidelines](CONTRIBUTING.md) before you start working on Dropzone!**
<br>
<div align="center">
<a href="https://gitlab.com/meno/dropzone/builds/artifacts/master/download?job=release"><strong>&gt;&gt; Download &lt;&lt;</strong></a>
</div>
<br>
<br>
This is no longer the official repository for Dropzone. I have switched to [gitlab.com](https://gitlab.com/meno/dropzone)
as the primary location to continue development.
There are multiple reasons why I am switching from GitHub to GitLab, but a few of the reasons are the
issue tracker that GitHub is providing, *drowning* me in issues that I am unable to categorise or prioritize properly,
the lack of proper continuous integration, and build files. I don't want the compiled `.js` files in my repository, and
people regularly commit changes to the compiled files and create pull requests with them.
I will write a blog post soon, that goes into detail about why I am doing the switch.
This repository will still remain, and always host the most up to date versions of dropzone, but only the distribution
files!
MIT License
-----------
{
"name": "dropzone",
"location": "enyo/dropzone",
"version": "5.7.0",
"description": "Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.",
"homepage": "http://www.dropzonejs.com",
"main": [
"dist/min/dropzone.min.css",
"dist/min/dropzone.min.js"
],
"ignore": [
"*",
"!dist",
"!dist/**/*"
]
}
{
"name": "dropzone",
"repo": "enyo/dropzone",
"version": "5.7.0",
"description": "Handles drag and drop of files for you.",
"scripts": [ "index.js", "dist/dropzone.js" ],
"styles": [ "dist/basic.css" ],
"dependencies": { },
"license": "MIT"
}
{
"name": "enyo/dropzone",
"description": "Handles drag and drop of files for you.",
"homepage": "http://www.dropzonejs.com",
"keywords": [
"dragndrop",
"drag and drop",
"file upload",
"upload"
],
"authors": [{
"name": "Matias Meno",
"email": "m@tias.me",
"homepage": "http://www.matiasmeno.com"
}],
"license": "MIT",
"minimum-stability": "dev"
}
/*
* The MIT License
* Copyright (c) 2012 Matias Meno <m@tias.me>
*/
.dropzone, .dropzone * {
box-sizing: border-box; }
.dropzone {
position: relative; }
.dropzone .dz-preview {
position: relative;
display: inline-block;
width: 120px;
margin: 0.5em; }
.dropzone .dz-preview .dz-progress {
display: block;
height: 15px;
border: 1px solid #aaa; }
.dropzone .dz-preview .dz-progress .dz-upload {
display: block;
height: 100%;
width: 0;
background: green; }
.dropzone .dz-preview .dz-error-message {
color: red;
display: none; }
.dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark {
display: block; }
.dropzone .dz-preview.dz-success .dz-success-mark {
display: block; }
.dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark {
position: absolute;
display: none;
left: 30px;
top: 30px;
width: 54px;
height: 58px;
left: 50%;
margin-left: -27px; }
// Uses AMD or browser globals to create a jQuery plugin.
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else {
// Browser globals
factory(jQuery);
}
}(function (jQuery) {
var module = {exports: {}}; // Fake component
"use strict";
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _possibleConstructorReturn(self, call) {
if (call && (_typeof(call) === "object" || typeof call === "function")) {
return call;
}
return _assertThisInitialized(self);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {constructor: {value: subClass, writable: true, configurable: true}});
if (superClass) _setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
/*
*
* More info at [www.dropzonejs.com](http://www.dropzonejs.com)
*
* Copyright (c) 2012, Matias Meno
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
// The Emitter class provides the ability to call `.on()` on Dropzone to listen
// to events.
// It is strongly based on component's emitter class, and I removed the
// functionality because of the dependency hell with different frameworks.
var Emitter =
/*#__PURE__*/
function () {
function Emitter() {
_classCallCheck(this, Emitter);
}
_createClass(Emitter, [{
key: "on",
// Add an event listener for given event
value: function on(event, fn) {
this._callbacks = this._callbacks || {}; // Create namespace for this event
if (!this._callbacks[event]) {
this._callbacks[event] = [];
}
this._callbacks[event].push(fn);
return this;
}
}, {
key: "emit",
value: function emit(event) {
this._callbacks = this._callbacks || {};
var callbacks = this._callbacks[event];
if (callbacks) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = callbacks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var callback = _step.value;
callback.apply(this, args);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
return this;
} // Remove event listener for given event. If fn is not provided, all event
// listeners for that event will be removed. If neither is provided, all
// event listeners will be removed.
}, {
key: "off",
value: function off(event, fn) {
if (!this._callbacks || arguments.length === 0) {
this._callbacks = {};
return this;
} // specific event
var callbacks = this._callbacks[event];
if (!callbacks) {
return this;
} // remove all handlers
if (arguments.length === 1) {
delete this._callbacks[event];
return this;
} // remove specific handler
for (var i = 0; i < callbacks.length; i++) {
var callback = callbacks[i];
if (callback === fn) {
callbacks.splice(i, 1);
break;
}
}
return this;
}
}]);
return Emitter;
}();
var Dropzone =
/*#__PURE__*/
function (_Emitter) {
_inherits(Dropzone, _Emitter);
_createClass(Dropzone, null, [{
key: "initClass",
value: function initClass() {
// Exposing the emitter class, mainly for tests
this.prototype.Emitter = Emitter;
/*
This is a list of all available events you can register on a dropzone object.
You can register an event handler like this:
dropzone.on("dragEnter", function() { });
*/
this.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
this.prototype.defaultOptions = {
/**
* Has to be specified on elements other than form (or when the form
* doesn't have an `action` attribute). You can also
* provide a function that will be called with `files` and
* must return the url (since `v3.12.0`)
*/
url: null,
/**
* Can be changed to `"put"` if necessary. You can also provide a function
* that will be called with `files` and must return the method (since `v3.12.0`).
*/
method: "post",
/**
* Will be set on the XHRequest.
*/
withCredentials: false,
/**
* The timeout for the XHR requests in milliseconds (since `v4.4.0`).
*/
timeout: 30000,
/**
* How many file uploads to process in parallel (See the
* Enqueuing file uploads documentation section for more info)
*/
parallelUploads: 2,
/**
* Whether to send multiple files in one request. If
* this it set to true, then the fallback file input element will
* have the `multiple` attribute as well. This option will
* also trigger additional events (like `processingmultiple`). See the events
* documentation section for more information.
*/
uploadMultiple: false,
/**
* Whether you want files to be uploaded in chunks to your server. This can't be
* used in combination with `uploadMultiple`.
*
* See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.
*/
chunking: false,
/**
* If `chunking` is enabled, this defines whether **every** file should be chunked,
* even if the file size is below chunkSize. This means, that the additional chunk
* form data will be submitted and the `chunksUploaded` callback will be invoked.
*/
forceChunking: false,
/**
* If `chunking` is `true`, then this defines the chunk size in bytes.
*/
chunkSize: 2000000,
/**
* If `true`, the individual chunks of a file are being uploaded simultaneously.
*/
parallelChunkUploads: false,
/**
* Whether a chunk should be retried if it fails.
*/
retryChunks: false,
/**
* If `retryChunks` is true, how many times should it be retried.
*/
retryChunksLimit: 3,
/**
* If not `null` defines how many files this Dropzone handles. If it exceeds,
* the event `maxfilesexceeded` will be called. The dropzone element gets the
* class `dz-max-files-reached` accordingly so you can provide visual feedback.
*/
maxFilesize: 256,
/**
* The name of the file param that gets transferred.
* **NOTE**: If you have the option `uploadMultiple` set to `true`, then
* Dropzone will append `[]` to the name.
*/
paramName: "file",
/**
* Whether thumbnails for images should be generated
*/
createImageThumbnails: true,
/**
* In MB. When the filename exceeds this limit, the thumbnail will not be generated.
*/
maxThumbnailFilesize: 10,
/**
* If `null`, the ratio of the image will be used to calculate it.
*/
thumbnailWidth: 120,
/**
* The same as `thumbnailWidth`. If both are null, images will not be resized.
*/
thumbnailHeight: 120,
/**
* How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.
* Can be either `contain` or `crop`.
*/
thumbnailMethod: 'crop',
/**
* If set, images will be resized to these dimensions before being **uploaded**.
* If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect
* ratio of the file will be preserved.
*
* The `options.transformFile` function uses these options, so if the `transformFile` function
* is overridden, these options don't do anything.
*/
resizeWidth: null,
/**
* See `resizeWidth`.
*/
resizeHeight: null,
/**
* The mime type of the resized image (before it gets uploaded to the server).
* If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.
* See `resizeWidth` for more information.
*/
resizeMimeType: null,
/**