var DropzoneCS = function(selector, options){

    this.dropzones = [];

    this.defaultOptions = {
        dictDefaultMessage: Translator.trans('cs_core.assets.widget.dictDefaultMessage'),
        dictFallbackMessage: Translator.trans('cs_core.assets.widget.dictFallbackMessage'),
        dictFallbackText: Translator.trans('cs_core.assets.widget.dictFallbackText'),
        dictFileTooBig: Translator.trans('cs_core.assets.widget.dictFileTooBig'),
        dictInvalidFileType: Translator.trans('cs_core.assets.widget.dictInvalidFileType'),
        dictResponseError: Translator.trans('cs_core.assets.widget.dictResponseError'),
        dictCancelUpload: Translator.trans('cs_core.assets.widget.dictCancelUpload'),
        dictCancelUploadConfirmation: Translator.trans('cs_core.assets.widget.dictCancelUploadConfirmation'),
        dictRemoveFile: Translator.trans('cs_core.assets.widget.dictRemoveFile'),
        dictRemoveFileConfirmation: Translator.trans('cs_core.assets.widget.dictRemoveFileConfirmation'),
        dictMaxFilesExceeded: Translator.trans('cs_core.assets.widget.dictMaxFilesExceeded'),
    };

    this.init(selector,options);
};

DropzoneCS.prototype.init = function (selector){

    var _this = this;

    $(selector).each(function(){
        var opt = $.extend(_this.defaultOptions, $(this).data());

        var _el = $(this).dropzone(opt);

        _this.dropzones.push(_el);
    });
};
