Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

144 lines
13KB

  1. (self["webpackChunk"] = self["webpackChunk"] || []).push([["adminlte-field-filemanager"],{
  2. /***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js":
  3. /*!****************************************************************************************************!*\
  4. !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js ***!
  5. \****************************************************************************************************/
  6. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7. "use strict";
  8. __webpack_require__.r(__webpack_exports__);
  9. /* 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");
  10. /* 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__);
  11. /* harmony import */ var _form_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./form.scss */ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss");
  12. $(document).ready(function () {
  13. initFileManager();
  14. });
  15. $('.field-collection').bind('collection-add-item', function () {
  16. initFileManager();
  17. });
  18. function initFileManager() {
  19. $('.lc-filemanager-delete').off('click');
  20. $('.lc-filemanager-delete').on('click', function (e) {
  21. var $field = $(this);
  22. $('#' + $field.data('id')).val("");
  23. $('#' + $field.data('id') + '_preview').prop('src', "");
  24. $('#' + $field.data('id') + '_preview_text').html('Aucun fichier');
  25. });
  26. $('.lc-filemanager-open').off('click');
  27. $('.lc-filemanager-open').on('click', function (e) {
  28. var $field = $(this);
  29. $('#lc-filemanager-frame').off('load');
  30. $("#lc-filemanager-frame").on('load', function () {
  31. $('#lc-filemanager-frame').contents().on('click', '.select', function () {
  32. var path = $(this).attr('data-path');
  33. $('#' + $field.data('id')).val(path);
  34. $('#' + $field.data('id') + '_preview').prop('src', path);
  35. $('#' + $field.data('id') + '_preview_text').html(path);
  36. $('#lc-filemanager-modal').modal('hide');
  37. });
  38. });
  39. $("#lc-filemanager-frame").prop('src', $field.data('target'));
  40. $('#lc-filemanager-modal').modal('show');
  41. });
  42. }
  43. /***/ }),
  44. /***/ "./node_modules/core-js/internals/a-function.js":
  45. /*!******************************************************!*\
  46. !*** ./node_modules/core-js/internals/a-function.js ***!
  47. \******************************************************/
  48. /***/ ((module) => {
  49. module.exports = function (it) {
  50. if (typeof it != 'function') {
  51. throw TypeError(String(it) + ' is not a function');
  52. } return it;
  53. };
  54. /***/ }),
  55. /***/ "./node_modules/core-js/internals/function-bind.js":
  56. /*!*********************************************************!*\
  57. !*** ./node_modules/core-js/internals/function-bind.js ***!
  58. \*********************************************************/
  59. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  60. "use strict";
  61. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  62. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  63. var slice = [].slice;
  64. var factories = {};
  65. var construct = function (C, argsLength, args) {
  66. if (!(argsLength in factories)) {
  67. for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
  68. // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
  69. factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  70. } return factories[argsLength](C, args);
  71. };
  72. // `Function.prototype.bind` method implementation
  73. // https://tc39.es/ecma262/#sec-function.prototype.bind
  74. module.exports = Function.bind || function bind(that /* , ...args */) {
  75. var fn = aFunction(this);
  76. var partArgs = slice.call(arguments, 1);
  77. var boundFunction = function bound(/* args... */) {
  78. var args = partArgs.concat(slice.call(arguments));
  79. return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  80. };
  81. if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  82. return boundFunction;
  83. };
  84. /***/ }),
  85. /***/ "./node_modules/core-js/modules/es.function.bind.js":
  86. /*!**********************************************************!*\
  87. !*** ./node_modules/core-js/modules/es.function.bind.js ***!
  88. \**********************************************************/
  89. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  90. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  91. var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
  92. // `Function.prototype.bind` method
  93. // https://tc39.es/ecma262/#sec-function.prototype.bind
  94. $({ target: 'Function', proto: true }, {
  95. bind: bind
  96. });
  97. /***/ }),
  98. /***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss":
  99. /*!*******************************************************************************************!*\
  100. !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss ***!
  101. \*******************************************************************************************/
  102. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  103. "use strict";
  104. __webpack_require__.r(__webpack_exports__);
  105. // extracted by mini-css-extract-plugin
  106. /***/ })
  107. },
  108. /******/ __webpack_require__ => { // webpackRuntimeModules
  109. /******/ "use strict";
  110. /******/
  111. /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
  112. /******/ __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")));
  113. /******/ var __webpack_exports__ = __webpack_require__.O();
  114. /******/ }
  115. ]);
  116. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vTGFDbGljQnVuZGxlL1NvdkJ1bmRsZS9SZXNvdXJjZXMvYXNzZXRzL2FwcC9hZG1pbmx0ZS9maWVsZC9maWxlbWF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NsaWNrJywgZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgbGV0ICRmaWVsZCA9ICQodGhpcyk7XG4gICAgICAgICQoJyNsYy1maWxlbWFuYWdlci1mcmFtZScpLm9mZignbG9hZCcpO1xuICAgICAgICAkKFwiI2xjLWZpbGVtYW5hZ2VyLWZyYW1lXCIpLm9uKCdsb2FkJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgJCgnI2xjLWZpbGVtYW5hZ2VyLWZyYW1lJykuY29udGVudHMoKS5vbignY2xpY2snLCAnLnNlbGVjdCcsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGF0aCA9ICQodGhpcykuYXR0cignZGF0YS1wYXRoJylcbiAgICAgICAgICAgICAgICAkKCcjJyArICRmaWVsZC5kYXRhKCdpZCcpKS52YWwocGF0aCk7XG4gICAgICAgICAgICAgICAgJCgnIycgKyAkZmllbGQuZGF0YSgnaWQnKSArICdfcHJldmlldycpLnByb3AoJ3NyYycscGF0aCk7XG4gICAgICAgICAgICAgICAgJCgnIycgKyAkZmllbGQuZGF0YSgnaWQnKSArICdfcHJldmlld190ZXh0JykuaHRtbChwYXRoKTtcbiAgICAgICAgICAgICAgICAkKCcjbGMtZmlsZW1hbmFnZXItbW9kYWwnKS5tb2RhbCgnaGlkZScpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgICAkKFwiI2xjLWZpbGVtYW5hZ2VyLWZyYW1lXCIpLnByb3AoJ3NyYycsICRmaWVsZC5kYXRhKCd0YXJnZXQnKSk7XG4gICAgICAgICQoJyNsYy1maWxlbWFuYWdlci1tb2RhbCcpLm1vZGFsKCdzaG93Jyk7XG4gICAgfSk7XG5cbn1cbiIsIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIGlmICh0eXBlb2YgaXQgIT0gJ2Z1bmN0aW9uJykge1xuICAgIHRocm93IFR5cGVFcnJvcihTdHJpbmcoaXQpICsgJy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