(self["webpackChunk"] = self["webpackChunk"] || []).push([["adminlte-field-filemanager"],{

/***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js":
/*!****************************************************************************************************!*\
  !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js ***!
  \****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.bind.js */ "./node_modules/core-js/modules/es.function.bind.js");
/* harmony import */ var core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_bind_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _form_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./form.scss */ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss");


$(document).ready(function () {
  initFileManager();
});
$('.field-collection').bind('collection-add-item', function () {
  initFileManager();
});

function initFileManager() {
  $('.lc-filemanager-delete').off('click');
  $('.lc-filemanager-delete').on('click', function (e) {
    var $field = $(this);
    $('#' + $field.data('id')).val("");
    $('#' + $field.data('id') + '_preview').prop('src', "");
    $('#' + $field.data('id') + '_preview_text').html('Aucun fichier');
  });
  $('.lc-filemanager-open').off('click');
  $('.lc-filemanager-open').on('click', function (e) {
    var $field = $(this);
    $('#lc-filemanager-frame').off('load');
    $("#lc-filemanager-frame").on('load', function () {
      $('#lc-filemanager-frame').contents().on('click', '.select', function () {
        var path = $(this).attr('data-path');
        $('#' + $field.data('id')).val(path);
        $('#' + $field.data('id') + '_preview').prop('src', path);
        $('#' + $field.data('id') + '_preview_text').html(path);
        $('#lc-filemanager-modal').modal('hide');
      });
    });
    $("#lc-filemanager-frame").prop('src', $field.data('target'));
    $('#lc-filemanager-modal').modal('show');
  });
}

/***/ }),

/***/ "./node_modules/core-js/internals/a-function.js":
/*!******************************************************!*\
  !*** ./node_modules/core-js/internals/a-function.js ***!
  \******************************************************/
/***/ ((module) => {

module.exports = function (it) {
  if (typeof it != 'function') {
    throw TypeError(String(it) + ' is not a function');
  } return it;
};


/***/ }),

/***/ "./node_modules/core-js/internals/function-bind.js":
/*!*********************************************************!*\
  !*** ./node_modules/core-js/internals/function-bind.js ***!
  \*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";

var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");

var slice = [].slice;
var factories = {};

var construct = function (C, argsLength, args) {
  if (!(argsLength in factories)) {
    for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
    // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
    factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  } return factories[argsLength](C, args);
};

// `Function.prototype.bind` method implementation
// https://tc39.es/ecma262/#sec-function.prototype.bind
module.exports = Function.bind || function bind(that /* , ...args */) {
  var fn = aFunction(this);
  var partArgs = slice.call(arguments, 1);
  var boundFunction = function bound(/* args... */) {
    var args = partArgs.concat(slice.call(arguments));
    return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  };
  if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  return boundFunction;
};


/***/ }),

/***/ "./node_modules/core-js/modules/es.function.bind.js":
/*!**********************************************************!*\
  !*** ./node_modules/core-js/modules/es.function.bind.js ***!
  \**********************************************************/
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {

var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");

// `Function.prototype.bind` method
// https://tc39.es/ecma262/#sec-function.prototype.bind
$({ target: 'Function', proto: true }, {
  bind: bind
});


/***/ }),

/***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss":
/*!*******************************************************************************************!*\
  !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
// extracted by mini-css-extract-plugin


/***/ })

},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ "use strict";
/******/ 
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ __webpack_require__.O(0, ["vendors-node_modules_core-js_internals_export_js"], () => (__webpack_exec__("../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js")));
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 7508 characters]