Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

129 linhas
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/function-bind.js":
  45. /*!*********************************************************!*\
  46. !*** ./node_modules/core-js/internals/function-bind.js ***!
  47. \*********************************************************/
  48. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  49. "use strict";
  50. var aFunction = __webpack_require__(/*! ../internals/a-function */ "./node_modules/core-js/internals/a-function.js");
  51. var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
  52. var slice = [].slice;
  53. var factories = {};
  54. var construct = function (C, argsLength, args) {
  55. if (!(argsLength in factories)) {
  56. for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
  57. // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
  58. factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
  59. } return factories[argsLength](C, args);
  60. };
  61. // `Function.prototype.bind` method implementation
  62. // https://tc39.es/ecma262/#sec-function.prototype.bind
  63. module.exports = Function.bind || function bind(that /* , ...args */) {
  64. var fn = aFunction(this);
  65. var partArgs = slice.call(arguments, 1);
  66. var boundFunction = function bound(/* args... */) {
  67. var args = partArgs.concat(slice.call(arguments));
  68. return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
  69. };
  70. if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
  71. return boundFunction;
  72. };
  73. /***/ }),
  74. /***/ "./node_modules/core-js/modules/es.function.bind.js":
  75. /*!**********************************************************!*\
  76. !*** ./node_modules/core-js/modules/es.function.bind.js ***!
  77. \**********************************************************/
  78. /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
  79. var $ = __webpack_require__(/*! ../internals/export */ "./node_modules/core-js/internals/export.js");
  80. var bind = __webpack_require__(/*! ../internals/function-bind */ "./node_modules/core-js/internals/function-bind.js");
  81. // `Function.prototype.bind` method
  82. // https://tc39.es/ecma262/#sec-function.prototype.bind
  83. $({ target: 'Function', proto: true }, {
  84. bind: bind
  85. });
  86. /***/ }),
  87. /***/ "../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss":
  88. /*!*******************************************************************************************!*\
  89. !*** ../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/form.scss ***!
  90. \*******************************************************************************************/
  91. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  92. "use strict";
  93. __webpack_require__.r(__webpack_exports__);
  94. // extracted by mini-css-extract-plugin
  95. /***/ })
  96. },
  97. /******/ __webpack_require__ => { // webpackRuntimeModules
  98. /******/ "use strict";
  99. /******/
  100. /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
  101. /******/ __webpack_require__.O(0, ["vendors-node_modules_core-js_internals_a-function_js-node_modules_core-js_internals_export_js"], () => (__webpack_exec__("../LaClicBundle/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js")));
  102. /******/ var __webpack_exports__ = __webpack_require__.O();
  103. /******/ }
  104. ]);
  105. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vTGFDbGljQnVuZGxlL1NvdkJ1bmRsZS9SZXNvdXJjZXMvYXNzZXRzL2FwcC9hZG1pbmx0ZS9maWVsZC9maWxlbWFuYWdlci9hcHAuZmlsZW1hbmFnZXIuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2Z1bmN0aW9uLWJpbmQuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2N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